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.
Build Custom ActiveStorage Analyzers for Ruby on Rails
We’ll dive into how ActiveStorage treats uploaded data, and how to extend this process, in part one of this two-part series:
Scaling image classification with AI
Learn how we used multi-modal Large Language Models to automatically categorize more than 1 million boat images, reducing months of manual work to a couple of days. Read more
Using Dispatch to communicate between Stimulus Controllers
A short article on how multiple Stimulus controllers communicate with each other using dispatch-method in Stimulus controller.
Adding an MCP server to a Rails app
Learn how to integrate the Model Context Protocol (MCP) into your Rails application to create intelligent, AI-powered tools that can interact with your data and perform complex tasks conversationally. Complete with code examples, client integrations, and real-world use cases
Rails Engine Assets: Making Your Gem Work with Sprockets AND Propshaft
The golden rule for libraries is to support integration with as many parent apps as possible because you want to cover as much as you can of the full spectrum of customers but Sprockets and Propshaft makes that difficult to do. Read more
Service Objects
is the clearest I’ve been able to articulate what I don’t like about service objects and how I think they should be implemented.
Use Rails views to render OpenGraph images
Himg renders HTML to an image - no browser needed. Add dynamic images to your site with just a .himg.erb template, perfect for transforming boring links to rich previews or upping your image SEO game.
Superform vs Rails form helpers: simple select tags
First edition at in a series that’s going to compare Rails form helpers with Superform. In this example, I show a top annoyance in Rails form helpers, which is modifying the option tags in a form select.
Run LLMs natively in Ruby with Rust + GPU support
Red Candle is a Ruby gem that lets you run Llama 2, Llama 3, Mistral, and Gemma large language models directly inside your Ruby process using Rust. Read more
Using LLMs and MCP to Debug PostgreSQL Performance in Rails
I’ve recently automated a large portion of my Rails performance audits. In this tutorial, I’ll describe how to configure an AI-powered PG performance debugging. We will cover using LLMs with custom MCP (model context protocol) n8n integration. We will also discuss the legal and security implications of connecting AI to the production database. There’s also a live demo available! Read more
Phlex class variants
Wrote to explain how to build component variations with nested Ruby classes and endless methods. Useful if you’re dealing with 10’s of variations and you don’t want to reach for a gem.
OTP Input field with StimulusJS
Token authentication, phone number verification or any form of Two-Factor Authentication are common features nowadays. A pattern that emerges from the fact that these codes tend to conform to a set number of characters is the input verification box. In this article, we will learn how to build an OTP input with Stimulus that’s configurable and offers a nice user experience. Read more
🚀 Writing Cleaner Rails Queries with Ruby's Range Operator
When you’re dealing with date windows or numeric intervals in Rails, there’s a simple trick to make your queries shorter and more expressive: Ruby’s .. range operator. Read more
🍸 Tonic - Digital Collections Framework
Your framework to build digital and explorable collections released several enhancements in the last weeks: Read more
Unofficial Claude Code SDK for Ruby — Now with MCP + Streaming Support
Just published a new Ruby gem claude_code — an unofficial SDK for working with Anthropic’s Claude Code via Ruby. It wraps the Claude CLI and supports:
RailsConf 2025 Recap: Introducing the Linter, Formatter, a Rails View Layer Vision
Herb v0.4.0 is out, now with the Herb Linter, a Herb Formatter preview, and deeper editor integration for HTML+ERB. Read more
one click to edit file
(a new version was released today: added support for a new Kiro IDE and other minor fixes). Interestingly, the next Rails version will support opening files in your IDE natively, because my PR was merged. However, for backward compatibility, please give a try to this gem.
🌐 MiniI18n v1.0 release
MiniI18n reaches v1! After some years of stability, it’s time to mark this important milestone 🎉 Read more
Phlex on Rails: Week Four
The fourth update at https://beautifulruby.com/articles/phlex-week-four-update will be one of my final updates during the “still accepting feedback on the course material”. After four weeks of work on the outline at https://beautifulruby.com/phlex I’m keeping pre-orders open this week in case folks want to get the course and provide feedback. ✌️
RailsConf 2025 Recap
A summary of my experience at the last RailsConf. https://kevinjmurphy.com/posts/railsconf-2025-recap/
aia version 0.9.9 released
The ruby gem aia (AI Assistant) v0.9.9 has been released along with a series of blog articles discussing the CLI-based AI utility starting with the AIA Philosophy. Read more
Rails On-Premise... At RailsConf!
A Story of Whimsy, Free Kazoos, and Web-Sockets…
Glimmer Web Components (+ Championship Win & General Recipe for Success)
The glimmer-web-components Ruby gem aims to offer a collection of reusable Glimmer Web Components for Glimmer DSL for Web (Award Winning Ruby on Rails Web Frontend Framework) that are extracted from real Rails web applications. Of course, they are fully customizable with component options and standard CSS/SCSS. Version 0.1.0 of the Ruby gem ships with the first Glimmer Web Component: “Multi Checkbox Dropdown”. It was extracted from my current work Rails web app at Eltropy Canada.