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.
I Tested Rails Baseline by Leaving Architecture Out of the Prompt
What two fresh coding-agent sessions revealed about an agent-friendly Rails starter. Read more
llm.rb v15.1.0 released
llm.rb is an advanced runtime for building agentic AI applications on CRuby. It has zero runtime dependencies by default, supports concurrent and parallel tool execution and has a single coherent API that spans 14+ providers.
When Should You Raise an Exception in Ruby?
How to decide between raising an exception and returning a value in Ruby by separating expected outcomes from failures that break a method’s contract. Read more
llm_cost_tracker v0.14.0: per-tag LLM budgets and a batch of cost-accuracy fixes
llm_cost_tracker is a Rails engine that records what your app spends on LLM APIs - per call, per model, per tag - into your own database, with a mounted dashboard. Read more
How I found two command injections in the spatial_features Ruby gem
While using the spatial_features Ruby gem for a side project, I noticed that filenames were being passed to system. It led me to two command injection paths, fixed in version 3.11.2. Here’s how I found them, built the PoC, and reported the issue:
How to Test User Registration with Minitest Rails
Rails 8’s bin/rails generate authentication gives you sign-in, sign-out, and password reset but it does not give you a way to register new users to the app. In this post you will add the registration feature and test it with Minitest: Read more
RailsDocks - Rails hosting the way it should be
I built RailsDocks because deploying a Rails application shouldn’t require becoming a part-time infrastructure engineer. Read more
Rails Baseline 1.0: A Rails SaaS Starter Built for Coding Agents
I shipped Rails Baseline 1.0 today. Read more
Install rv as a mise tool
If you’re already using mise and would like to try rv, you can install it by following this guide:
ActiveRecord with update_all/delete_all with returning option
- this could be useful to know what actual records were updated/deleted. A small utility gem to solve this problem.
Access control for AI agents on Rails: gating SQL with Action Policy
An AI assistant with read-only SQL is a superhero. Until it fails privacy responsibilities and leaks sensitive data to everyone. We noted this possibility in an internal tool, moved the data boundary from prompt to Action Policy, and kept open-ended SQL: Access control for AI agents on Rails: gating SQL with Action Policy
A fresh look at Hanami
I revisited Hanami recently, and liked it! Here are my initial thoughts and impressions after completing its starter tutorial. I’ll be digging in further soon, so stay tuned. Read more
A Guide to using Batches in SolidQueue
Digs into the new batch feature in SolidQueue. How to configure it, how to utilize the APIs, advice on how to structure a batch, and code inspiration - like splitting a RubyLLM chat into parallel sub agents using batches Read more
Video: Glimmer DSL for Web Release Version 0.10.0 & 0.10.1
Release video for Glimmer DSL for Web (Award-Winning Frontend Framework for Ruby on Rails) 0.10.0 & 0.10.1 Auto-Conversion of Date/Time Element Values + New Sample
Coding guidelines
What holds in any language. What holds in Ruby. What holds in Rails. Extracted so I don’t have to tell agents how to write my code every time. Which ones do you approve? Which ones do you reject? Read more
The Persistence APIs That Skip the Record Lifecycle
A source-backed guide to what delete, update_columns, update_all, insert_all, and upsert_all do with callbacks, timestamps, locking, and loaded objects. Read more
Authorization testing in Rails
Chapter 13 of the free Minitest Rails guide is out now. Learn how to test Rails authorization with Minitest: Read more
JetUI — open source Rails component library
JetUI is an open source Rails 8 component library we’ve been building at JetRockets — 29 components, 8 form fields, and 61 UI blocks, built on ViewComponent, Tailwind CSS 4, and Stimulus. Copy-paste, not a dependency. We’re just about to hit 5,000 downloads. Read more
Where do you deploy your Ruby apps?
I’ve been doing some explorations about deployment options for Ruby, so I’m curious to learn more about what you’re using to deploy your applications. Read more
Get in, human: cut Rails boot time with require-profiler and this guide
Rails boot time is a DX metric now. Every restart costs deploys, CI, and human attention. And agents boot apps way more than people. So, our convenient new require-profiler gem shows what happens during boot: requires, Rails initializers, YAML parsing, HTTP calls. Run it, then drop to a sampling profiler for what the tree can’t explain. One 200-component monolith cut development boot time by 40%. Read more
Migrating from Sphinx to PostgreSQL full-text search
Some notes on migrating a small site from Sphinx to PostgreSQL. Shout-out to Daniela Baron for her article on this, very helpful! Read more
One of The Dumbest Questions Asked on Ruby/Rails Subreddits
One of the dumbest questions I see asked on the Ruby/Rails subreddits is “Are Ruby & Rails still worth learning today?”, plus other variations, such as “Are Ruby and Rails still relevant today?” and “Are Ruby and Rails dead?”
Displaying File Names for Multi-File Inputs with Stimulus
The HTML file input shows “n files selected” when multiple files chosen. Here’s how Stimulus can be used (with or without Rails) to turn that into a list of file names for a better UX
When Should You Use after_commit in Rails?
A Rails callback race traced across record saves, outer transactions, background-job connections, Active Job deferral, transactional tests, and the delivery gap after commit. Read more
Pluckr - gem to query your DB efficiently
https://github.com/igorkasyanchuk/pluckr - a gem that can return results from multiple queries using 1 SQL statement. Read more