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!
Last Friday
llm.rb: a minimalist's library for interacting with LLMs
llm.rb provides a clean, dependency-free way to work with large language models from Ruby. It supports multiple providers (OpenAI, Gemini, Anthropic, Ollama) through a simple, consistent interface — without external dependencies or heavy abstractions. If you like plain Ruby objects, clear APIs, and composable tools, you might find it useful :)
🚀 Understanding HTTP Request Headers in Rails! 🛠️
Curious about what your browser sends to the server every time you load a page? I built a simple Ruby on Rails app that displays all the HTTP request headers sent by your browser, and I’m excited to share the results! [more inside]
🔍 Mastering the Art of Shrinking Data Without Losing a Byte
Just published a new article exploring lossless data compression in Ruby—a fun and practical dive into how algorithms like Run-Length Encoding (RLE) can help reduce file sizes without losing information. [more inside]
Sanitize your strings in JavaScript like a Rails developer
What if you could write JavaScript that gets _really_close to what you can do with Ruby/Rails? https://railsdesigner.com/sanitize-javascript-like-rails/ In this article I creating a sanitize
method to clean up content from trailing/leading white-spaces, multiple new lines and essentially whatever else you want (or not!) 🧹
Simple Pagination for Rails Controllers
If you need pagination but not the kitchen sink, keep it simple with NextPage.
🚀 Optimize Your Ruby App's Memory Usage with jemalloc-rb 💻
If you’re working on long-running Ruby applications or handling a lot of data, memory management becomes crucial! 🧠 In my latest article, I explore how you can boost your app’s performance and reduce memory fragmentation using the jemalloc-rb gem. [more inside]
Keep Active Record models clean with Decorators
One of two “patterns” I generally reach for. https://railsdesigner.com/saas/decorators/ Including some niceties, without any gems.
Montreal.rb April 2025 Domain Driven Design in Ruby on Rails
The video for the Montreal.rb April 2025 talk “Domain Driven Design in Ruby on Rails” has been published: https://www.youtube.com/watch?v=JlJLz2dJlhQ&list=PLRAf4zt5oEjc2mqmEN9m_O0JovQCXxvxt&index=17
📘 New Article: Building Flexible Data Models in Rails with the EAV Pattern
In many applications, products or entities require a flexible structure where fields vary depending on the type. Managing this kind of dynamic data model in a relational database can be challenging. [more inside]
Scaling Rails Applications
Today, we are kicking off a series of blogs on scaling Rails applications. [more inside]
Adding shortcodes to the Marksmith editor
Occasionally, when creating content using an editor, be it Markdown or WYSIWYG, we need specific parts that exceed standard formatting options. Whether it’s highlighting important information, adding visually enriched snippets or embedding third-party content, the basic editor features often fall short. This is where adding a short code or callout feature is useful. In this article, we will learn how to add shortcode support to the Marksmith editor by building a blog with enriched content abilities. https://avohq.io/blog/marksmith-shortcodes
Seamless Loading with Hotwire Native 🔥
Turbo Native on iOS provides a fast foundation, but achieving smooth loading transitions requires some fine-tuning. In this article, our Rails team walk through how they implemented a lightweight fix using Turbo Streams and a native LoadingStateView, resulting in seamless transitions with minimal code. [more inside]
🧠 Curious about how Ruby actually runs your code?
In this article, I take a peek under the hood and explore how YARV (Yet Another Ruby VM) executes Ruby instructions — from bytecode to stack frames. If you’re into Ruby internals or just want to understand what really happens when your code runs, this is for you. https://rubystacknews.com/2025/04/21/%f0%9f%a7%a0-understanding-rubys-yarv-yet-another-ruby-vm-stack-mechanics-from-code-to-execution/
HTML Parsley with Herb
I dig a little deeper into the Herb (ERB) parser, taking a look at the resulting nodes and structure of the AST on the HTML side: https://www.crossingtheruby.com/2025/04/20/html-parsley-with-herb
HTML Gardening with Herb
I write about two potential use-cases for Marco Roth’s new ERB parsing library, Herb: https://www.crossingtheruby.com/2025/04/19/html-gardening-with-herb
Add an RSS feed to your Middleman Blog
I recently added an RSS feed to my middleman blog, and explained the process here: https://harrisonbroadbent.com/blog/middleman-rss-feed/
[ANN] bidi2pdf 0.1.7 & bidi2pdf-rails 0.0.1.alpha.1 released
🚀 bidi2pdf 0.1.7 now supports ActiveSupport::Notifications-style instrumentation — fully compatible with Rails’ native instrumentation. So you can use the build in or use ActiveSupport::Notifications as a drop-in replacement to hook into your existing logging or monitoring setup! [more inside]
JavaScript for Rails Developers is out now
If you have been a Rails developer who has cursed at JavaScript, this book might be for you. https://javascriptforrails.com/[more inside]
Blogging with Ruby, Middleman and Tailwind CSS
Middleman is a Ruby static site generator that I use for my personal site. I maintain an open-source Middleman blog template that you might find interesting, more info here: https://harrisonbroadbent.com/blog/ruby-middleman-blog/
Introducing Herb — a fast, modern, and HTML-aware ERB parser, designed from the groun
As announced at RubyKaigi today, I’ve been working on a new HTML-Aware ERB Parser that I just released today. [more inside]
🚀 New post on why the .gemspec file deserves more attention.
A well-crafted .gemspec isn’t just a checklist — it’s your gem’s DNA. It defines who it’s for, how it works, what it depends on, and where it lives. In trix-genius, I wanted everything to feel thoughtful and useful from the moment someone installs it. That intention starts here. [more inside]
Old Ruby and Rails on new hardware with dev containers
New post! I need to revive an ancient Rails app (read: Ruby 2.1, Rails 4.0!) after nearly a decade of dust. This is a great fit for a dev container. Here’s what I put together, along with some commentary, May it suit your next legacy Rails revival! https://everydayrails.com/2025/04/15/old-ruby-rails-dev-container
🚀 Just dropped a new update to my gem TrixGenius — now with math expression evaluati
You can type something like (5 + 3 * 2) and hit the ✨ “Calculate” button — the result gets auto-inserted right in the content. Perfect for Rails apps that use ActionText and need some smart input magic. [more inside]