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.
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. [more inside]
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! [more inside]
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. [more inside]
🚀 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. [more inside]
🍸 Tonic - Digital Collections Framework
Your framework to build digital and explorable collections released several enhancements in the last weeks: [more inside]
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. [more inside]
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 🎉 [more inside]
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. [more inside]
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.
Phlex Turbo Layouts
Code snippet at shows how to control Turbo meta tags in the head, and in the page, from one place in a Phlex view.
Mastering Iteration in Ruby: for, each, while, until
Creating Custom Enumerable Methods with Ruby Loops
Rails Dashboards that scale – with SQL and dry-struct
Crunch data with SQL, return JSON, wrap it in type-safe DryStructs, and swap in Faker or plug into a data warehouse. [more inside]
OpenAI and ruby? Yes, we can!
Curious how artificial intelligence and Ruby can work together? [more inside]
Making Logs Clickable in Rails
I would like to introduce you to my short story about the new Ruby on Rails gem. https://medium.com/@kasvit93/making-logs-clickable-in-rails-599eff931b8f And link to the gem directly. https://github.com/Kasvit/clickable_logger