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.
Model Context Protocol
Model Context Protocol (MCP) is an API interface for your applications that are formatted in a way that machine learning platforms can interact with them. They can be used to generate AI insights, perform tasks based on user input or other things. https://www.driftingruby.com/episodes/model-context-protocol
The /o in Ruby regex stands for “oh the humanity!”
A journey into the wildly confusing /o regex modifier in Ruby. [more inside]
Consistent MySQL structure.sql Diffs for Rails
A guide on how to remove noise from structure.sql diffs in Rails when working with MySQL. [more inside]
Introducing Decant
Introducing Decant, a dependency-free frontmatter-aware framework-agnostic wrapper around a directory of static content (probably Markdown) that pairs perfectly with Parklife plus your favourite Ruby web framework to help you make a content-driven static website: https://www.benpickles.com/articles/95-introducing-decant
Turbo adapter: Hotwire Native's backdoor entrance
Understanding exactly how Hotwire Native integrates with the web app can be very helpful both in debugging issues and deciding if Hotwire Native is the right choice in the first place. In particular, it’s useful to understand how it takes over web navigation so it can make it feel native. This is what the article explains: Turbo adapter: Hotwire Native’s backdoor entrance
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: https://blog.appsignal.com/2025/07/30/build-custom-activestorage-analyzers-for-ruby-on-rails.html
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. [more inside]
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. https://www.jomppanen.com/2025/07/23/use-dispatch-to-communicate-between-stimulus-controllers.html
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 https://avohq.io/blog/mcp-server-rails
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. [more inside]
Service Objects
https://beautifulruby.com/code/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 https://beautifulruby.com/code/superform-simple-select-fields 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]
Phlex class variants
Wrote https://beautifulruby.com/code/simple-phlex-class-variants 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
https://github.com/igorkasyanchuk/editor_opener (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.