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.
Today
Rails Performance: 5 Critical Bottlenecks You're Missing
I just published a short post on the 5 most common Rails performance issues. https://www.shivamchahar.com/posts/rails-performance-5-critical-bottlenecks-you-are-missing
Solving Real-World Rails Authorization Problems with Rabarber
Long ago, we were building a custom admin area with multiple internal roles, each requiring different access levels. Existing authorization solutions didn’t quite fit our needs for simple role checks, which led us to create Rabarber, a Ruby on Rails authorization library. In this article, you can read about how it came to be and how to use Rabarber for typical use cases: https://dev.to/enjaku4/role-based-authorization-for-rails-how-we-built-rabarber-ahi
Are you a startup aiming to bring your product idea to life faster and more efficient
Partner with a trusted Outsourced Product Development (OPD) company like Synclovis Systems. By outsourcing your product development, you can reduce costs, gain access to specialized expertise, and accelerate your go-to-market timeline. Our experienced team manages every stage of the product lifecycle — from design and development to testing and deployment — ensuring top-notch quality at every step. [more inside]
My go-to prompt for legacy code exploration
Hey Ruby friends! I wrote a post about My go-to prompt for legacy code exploration. It’s not Ruby-specific but I use it a lot on Rails rescue projects!
Phlex component fundamentals
Today I’m kicking off the second unit of free Phlex on Rails videos with the “Phlex is Ruby” video at https://beautifulruby.com/phlex/components/basics. This unit is geared towards people who have experience with Ruby and are Phlex-curious.
Two free Phlex on Rails videos
The last of my introduction videos, “Why Rails” at https://beautifulruby.com/phlex/overview/rails and “Why Components?” at https://beautifulruby.com/phlex/overview/components. The next videos will be less intro and more instruction.
How to use local Docker registry in Kamal
Here’s how to save costs and avoid DockerHub with a completely local Docker registry.
Kamal Handbook 2.1 released
I released Kamal Handbook 2.1 which updates the book to Kamal 2.8.2.
Why Phlex? A comparison with ViewComponent & Rails partials
https://beautifulruby.com/phlex/overview/phlex is the first video in a series where I’m going to make some of the Phlex on Rails videos free for a day as we get closer to the holidays. Think of it as a Phlex advent calendar.
Creating a Custom Bundler Plugin
Learn to write a custom Bundler plugin with this series of articles from PracticalRubyGems.com - companion site to the new book from Apress. The tutorial walks you through the creation of bundler-trivy - a plugin which runs Trivy, the open source dependency scanner, whenever you run bundle install. [more inside]
The N+1 Query Problem in Active Record
Master the N+1 problem in Active Record. Understand when to use joins, includes, or both to optimize Rails database queries and boost performance. [more inside]
Friendly Attributes Pattern
Friendly Attributes helps reduce typing and visual clutter when building record collections. It results in concise, readable, and even joyful code that captures the spirit of Ruby. Read more at: https://brunosutic.com/blog/ruby-friendly-attributes-pattern
Rails 8.1: Resilient Jobs, Better Logs, and Local CI
Rails 8.1 is here, and after digging into the new features, it looks like a solid upgrade 🎯. This release focuses on developer experience and production reliability—job continuations, structured logging, and local CI are the standouts. Read: https://www.shivamchahar.com/posts/rails-8-1-resilient-jobs-better-logs-local-ci
Failover Requests
In this episode, we look at creating a failover mechanism for API requests. This can be a handy trick in situations where you want to add fault tolerance to an API request. We’ll use the example of the Ollama Cloud as a failover to a locally hosted instance of Ollama. https://www.driftingruby.com/episodes/failover-requests
Mesh Gradient Avatars in Rails
Dynamic avatars with Ruby are a common feature as we usually want to provide sensible default values without resorting to the same default avatar for every single user. The most common solution to this issue is to generate them using the user’s initials, default images or background colors. These solutions are fine but we can do better: in this article we will learn how to create deterministic mesh gradient avatars using Ruby and the ChunkyPNG gem to improve our avatar game Read the full article on: https://avohq.io/blog/mesh-gradient-avatars-in-rails
Ruby Enumerable methods: .each, .map and .select
Ruby Enumerablea Ruby module, and a big part of what makes Ruby a great programming language.
How to fix the new error "certificate verify failed (unable to get certificate CRL)"
Are your Ruby projects suddenly failing with the error “certificate verify failed (unable to get certificate CRL)”? That’s due to a breaking change in OpenSSL 3.6.0. Read my article to see how to fix it.
You need gems? Look at ore!
You need gems? Look at ore! I wrote a little piece about this new tool to install your gems. https://greg.molnar.io/blog/ore-bundler-compatible-gem-manager/
You Don’t Need Types in Ruby
Forcing static typing into Ruby is like putting a manual transmission in a Tesla. New post on why Sorbet misses the point entirely. [more inside]
The Joy of a Single-Purpose Class: From String Mutation to Message Composition
I can’t remember the last time I had this much joy introducing such a simple class. Started with Ruby 3.4 deprecation warnings, ended with a solution that leverages to_str for implicit string conversion and kills primitive obsession. [more inside]
The Potential of Ruby's ri Command for Coding Agents
The ri command already splits the document into well-chunked sections so that coding agents can get the correct context accurately. [more inside]