The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
A scary side of ActiveRecord's find
You may not know how a tiny oversight might affect your application - learn about a scary side of ActiveRecord’s find
Quick and easy admin options for Rails
This article presents some options for extending your existing applications with a pre-generated, customizable admin console. [more inside]
Why Ruby on Rails Is Still a Good Choice in 2019
Ruby on Rails is almost 15 years old but it’s nowhere close to passing on from the world of programming. While no longer among the most popular, Ruby on Rails is still widely used in 2019, offering maturity, stability, and high code quality. Let’s see what else makes this framework a good choice for your project in 2019–https://hi.monterail.co/2HszTjo
Elixir Programming: Facts to Know for Better App Development
There many well-known web development languages as Python, PHP, and Ruby that have been successfully used by developers for a long time. There has recently been brought a new technology that is being thoroughly discussed which is called the Elixir programming language. [more inside]
Do you really know public, private and protected in Ruby?
How well do you know the public, private and protected access in Ruby? Do you REALLY know the details? 🤔 Dive deeper into the nuances in our latest blog post - https://bit.ly/2UHsXSB
A Deep Dive into Routing and Controller Dispatch in Rails
Let’s explore how routing works under the hood in Rails. How does a web request make it all the way to your Rails controller?
Deploying Machine Learning Models for Ruby applications using PyCall
Previously, we have trained a really simple model that was predicting income level between “<= 50K” and “> 50K”. It was a very simple classification problem for which we could use Sklearn-porter to generate Ruby code based on the trained model. This time I decided to pick a more complicated dataset for regression problem. To complicate the project a little bit more and make it look more like “real-life”, we implement Sklearn’s pipeline that will transform the data into the shape expected by an estimator. Let’s implement PalmSpringsBnB that is able to suggest a list of prices based on information about the property.
Released merkle_tree gem
A merkle_tree is a Ruby implementation of binary tree of one-time signatures known as Merkle tree. You can verify if a message belongs to the tree, update any leaf to create a signature for a new message or expand the tree with new nodes. Enjoy!
Keep your state changes local
Short article on managing mutations in code in a way that will minimize the chance for bugs.
Interview with Jesus Castello
Jesus Castello talks about the Roda Framework, its uses and stats around its performance. https://www.driftingruby.com/episodes/interview-with-jesus-castello
CI/CD Pipelines: A Gentle Introduction
Learn about the purpose and basic building blocks of CI/CD pipelines, with examples and an overview of best practices. Read on the Semaphore blog »
Gem of the Week - hexapdf - Read & Write PDF Documents; Merge, Extract, Optimize...
Hello, I’m restarting (and updating) the Gem of the Week Series that highlights a new ruby library every week on Thursdays. Let’s welcome the hexapdf gem / library and command line tools - read and write PDF documents; start from zero or merge, extract, optimize and much more. Thanks to Thomas Leitner for the write-up (and the great gem). Happy coding with ruby. Cheers. Prost.
What causes Ruby memory bloat?
Ruby apps can use a lot of memory. But why? Various people in the community attribute it to memory fragmentation, and provide two “hacky” solutions. Dissatisfied by the current explanations and provided solutions, I set out on a journey to discover the deeper truth and to find better solutions.
AMA with Aaron Patterson
Core RoR member and GitHub engineer Aaron Patterson is hosting an AMA session on Hashnode today.
About Ruby Certification
I’ve recently took ruby certification tests and considering that there are very little info about them decided to wrote a blog-post. Read on if you wondering if they’re actually any good.
Rails 6 adds delete_by and destroy_by as ActiveRecord::Relation methods
Rails has find_or_create_by, find_by and similar methods to create and find the records matching the specified conditions. Rails was missing similar feature for deleting/destroying the record(s). This blog covers how this problem was solved in Rails 6.
new Rails 6 feature: SQL efficient bulk insert/upsert
https://github.com/rails/rails/pull/35077 was finally merged. You can find more details in my blog post.
Might be useful gem in development (and prod)
https://github.com/igorkasyanchuk/execute_sql gem which allows executing custom SQL queries directly in rails console or in any other parts of the app.
Simple Rails & AWS Lambda Integration using Rack
Introducing Lamby. Simple Rails & AWS Lambda Integration using Rack. The goal of this project is to provide minimal code along with comprehensive documentation to get your Rails application running under AWS Lambda. https://technology.customink.com/blog/2019/03/13/rails-on-aws-lambda-with-sam/
A little guide to converting jQuery to Stimulus
I’ve been refactoring my existing apps from jQuery snippets to Stimulus controllers, and I thought it’d be helpful to put down some of the patterns I found. https://johnbeatty.co/2019/03/13/convert-your-jquery-snippet-to-a-stimulus-controller/
Building a Slack App using Ruby and Sinatra
Creating a Surf forecasting tool using Slack Slash Commands and Actions. https://dev.to/runtime-revolution/building-a-slack-app-using-ruby-and-sinatra-2ie4