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.
The Basics of Rack for Ruby
Rack is the foundation for every popular Ruby web framework in existence. In the first part of a three-part series, let’s set up a Rack app: https://blog.appsignal.com/2024/10/30/the-basics-of-rack-for-ruby.html
How I upgraded my pet project from Rails 7 to Rails 8 in 30 minutes
A step by step description of the upgrade with links to the project itself and commits
Turbo Frames in Rails: A Complete Guide to Lazy-Loaded Components
This article Turbo Frames in Rails: A Complete Guide to Lazy-Loaded Components is the continuation of the previous article on ViewComponent vs Phlex vs Partials.
A practical GitHub Actions pipeline example with Rails
Continuous integration (CI) pipelines are an important part of building and deploying reliable software. Here’s how to set up a GitHub Actions pipeline for Rails.
ruby -run
Ruby is well known as a language that is easy to use from the surface, but is very deep and complex underneath. That’s what we know and love about it as a language, but its standard library has a similar design and as such it contains many hidden gems. One of the gems I’ve learned about recently is un. [more inside]
Guide: Use a Single Form to Create Multiple Nested Models (at once)
How to handle multi-level nested forms, with a StimulusJS solution to add new child items. It uses nested attributes. [more inside]
ViewComponent vs Phlex vs Partials
I have been using Partials since I started programming in Rails in 2005. ViewComponent and Phlex remind me of React Components making an HTML chunk re-usable. Well, partials do the same. Read the full article here - ViewComponent vs Phlex vs Partials: A Comprehensive Comparison in Ruby on Rails.
HexaPDF 1.0.0 released
After 10 years of working on HexaPDF, I released version 1.0.0. The news entry contains the short list of changes and what’s next.
The Unicode::Emoji::REGEX now supports unqualified Emoji sequences
Unqualified refers to recommended Emoji sequences that miss the special codepoint U+FE0F (Variation Selector 16) . For example, the Emoji “man golfing” can appear in all three forms: [more inside]
Russian Doll Caching in Rails: A Complete Guide to Fragment Caching Optimization
Using caching on modern web apps is very important. And, when you have nested records then fragment cache is the saviour. Read Russian Doll Caching in Rails: A Complete Guide to Fragment Caching Optimization.
rubocop-obsession: A RuboCop extension focused on higher-level code concepts
rubocop-obsession is a collection of RuboCop cops that focus on higher-level concepts, like checking that code reads from top to bottom, or only unit testing public methods. Reading through their implementation can give you inspiration to build your own custom cops aligned with your project’s best practices.
Why is your Rails app boot slow?
Even asked your self why is your Rails app boot slow?
Creating web app monoliths that boot instantly with Ruby
This article explores how we can create web apps that boot in under a second with Ruby.
Sending Web Push Notifications from Rails
In advance of the proposed new push notification framework for Rails 8, Action Notifier, it may be helpful to know how Web Push works under the hood. This article provides a recipe for implementing Web Push on Rails and has something you won’t find in most posts about Web Push: a working demo! (in supporting browsers and devices) 😅 [more inside]
Rails 8 authentication generator
Rails 8 has introduced a generator for adding basic authentication code to Rails apps. I took it for a spin and found out it doesn’t generate a registration page! Read more about my impressions of the Rails authentication generator and notes on adding a registrations endpoint.
Kamal Handbook, 2nd edition for Kamal 2 is out
I just released the second edition for Kamal Handbook. Kamal is the new deploy tool by DHH and team at 37signals and a new Rails 8 default gem.
The ultimate guide to Sidekiq scheduled jobs
Sidekiq remains the fastest and most robust job processing system for Ruby on Rails and ActiveJob. Our latest article explores how to work with scheduled jobs in Sidekiq. Give it a read!
Migrating an 8-yr-old Rails app from Heroku to Render
What’s it like to migrate a mature SaaS app with real traffic from Heroku to Render? I’ll walk you through it in this 30-minute video.