
When building Rails apps, we often take render
for granted. It’s easy to let Rails implicitly render the default template or to drop in render :new
to render a different template.
However, as you get deeper into Rails, you learn that there’s a lot more under the hood: whether you want to render JSON APIs, partials, custom inline ERB, or raw files, the render
method is one of the most flexible and powerful tools in the Rails controller toolbox.
Let’s explore the various ways to use render
in controller actions, starting from the basics, and then venturing into the lesser-known territory. Knowing all the ways render
works helps you…
#753 — June 5, 2025
Ruby Weekly

Implementing Embedded TypedData Objects — A look under the hood at TypedData, an implementation detail of Ruby commonly used internally and by native gems to store a native pointer to arbitrary data (Peter has written more about TypedData here). The news here is about a new embedded TypedData approach where the data is stored alongside the object rather than elsewhere, leading to speedups across numerous areas of Ruby.
Peter Zhu
Our Production Ruby and Rails Stack — The creators of a SaaS product give a nice, clear outline of all the moving parts that…
🧼 Skinny Controllers, Fat Models – A Classic Ruby on Rails Guideline
June 5, 2025 In the world of Ruby on Rails, few principles have stood the test of time like the mantra: “Skinny Controllers, Fat Models.” While it may sound quirky, this simple phrase encapsulates a deep architectural philosophy that encourages maintainability, clarity, and clean code — the Rails way. What It Really Means The … Continue reading
Skinny Controllers, Fat Models – A Classic Ruby on Rails Guideline
This article is extracted from the book JavaScript for Rails Developers and adapted for the web. Get your copy today. ✌️
Writing code is not a linear process—you can’t always see what needs to be written when staring at a blank canvas. In this article, I want to document the steps I took to write a method from from a larger codebase. You’ll see how it evolved from a highly procedural structure with difficult to follow if/else branches into a more object-oriented design that is actually followable and more straightforward to maintain.
For context: the feature of this code allows lines of a code editor (that is built in the book) to be moved up and down using the arrow keys. References…
Frequently Played June 2025
Frequently Played 🔗
I tend to listen to the same songs or albums on repeat that are evocative of how I’m feeling or what’s going on with me. Here is what I’m currently listening to over, and over, and over, and over, again.
Countin’ On A Miracle 🔗
Unfortunately, miracles are nothing more than dreams gone bad.
It’s a fairy tale so tragic
There’s no prince to break the spell
I don’t believe in magic
But for you, I will, yeah, for you, I will
If I’m a fool, I’ll be a fool
Darling, for you
Could Have Been Me 🔗
The Struts are maybe the greatest expression of pure joy and excitement I’veseen live. If Rock N Roll still mattered culturally, they’d be a household name.
I wanna live better…
A nice email for subscribers
I got this nice email from Defector, an online publication I pay for (along with De Programmatica Ipsum, Garbage Day, and Today in Tabs. I think that’s it, though I guess I can include Rubyland.news and Short Ruby Newsletter too). I yearn to share something like this for everyone who actively, if not always monetarily, supports my own work. The feeling is there, though not words this nice.
Subject: Thank you for supporting Defector
I like when people ask me how Defector is doing. Thanks to subscribers like you, I get to say that not only that Defector is doing well, but that I love my work.
I spent most of my life as a writer in jobs that were always and…
Company Spotlight: How Persona Scales High-Stakes Identity Systems With Rails

For Ruby developers who have ever been told that Rails won’t scale, Persona is a perfect counterexample. Their identity verification product helps global companies verify users across 200+ countries, processing passports, government IDs, and digital credentials with millisecond precision. And Rails is at the center of it all.
“We chose Ruby on Rails because its emphasis on convention over configuration helps us avoid common pitfalls and keeps our focus on identity problems,” says Charles Yeh, CTO at Persona. “One of our biggest technical challenges is domain modeling—defining and evolving complex real-world concepts in software—and Ruby on Rails’ emphasis on clear, maintainable models made…

The AI era demands speed—and smarter changelogs! Whether you're building agents or full-stack AI, use changelogs to get people interested and invested in your progress, build in public, and tell your story.
The age of AI has intensified development speed and magnified the importance of more engaging and strategic changelogs. Whether you're building an agent-driven product, a full-stack AI company, or launching as a design founder, don’t neglect the changelog’s power to signal progress, build in public, and tell…
Read The Nice Manual
A few months ago, we made an RDoc theme. Its goal was to improve the layout, the navigation, and the reading comfort. We were using it to generate the Ruby documentation.
We decided to take it one step further by generating the documentation for a select group of Ruby gems. So here we are with RubyRubyRubyRuby.dev.
Even if RDoc itself improved nicely in the previous months, we believe you will enjoy reading documentation with a common layout for various gems. So far, we noticed a good effect on us. We are getting used to clicking on random classes and reading their methods to learn new things. We hope you’ll find that too.
For now, adding a new gem to RubyRubyRubyRuby.dev is a manual…
In my previous post, An LLM-based AI Assistant for the FastRuby.io Newsletter, I introduced an AI-powered assistant we built with Sinatra to help our marketing team write summaries of blog posts for our newsletter.
In this post, I’ll go over how we implemented semantic search using pgvector
and Sequel
to fetch examples of previous summaries based on article content.
Semantic search allows our AI assistant to find the most relevant past examples, given meaning and context, when generating new summaries. This helps ensure consistency in tone and style while providing context-aware results that will serve as better examples for the large language modal (LLM) to generate new summaries,…
Internally, CRuby’s objects are strongly typed, with various types such as Array, Hash, Regexp, and Object. There is also a type called TypedData which is a data type used internally and by native gems to store a native pointer to an arbitrary piece of data. Some types in Ruby that are TypedData objects include Time, Mutex, and Enumerator. Native extensions like Nokogiri, pg, mysql2, and liquid-c also use TypedData objects extensively.
Jean Boussier and I implemented TypedData objects on Variable Width Allocation in Ruby 3.3, which improves performance and memory usage. In this blog post, we will explore what TypedData objects are, how the memory layout changes with embedded TypedData…
Implementing Embedded TypedData Objects
“That cannot be done.” Is rarely true, but it’s a phrase I’ve heard more and more from technical people without offering any rationale or further explanation. This tendency to use absolute language when making blocking statements reminded me of a useful “McDonald’s rule” that I was introduced to many years ago when deciding where to eat with friends. It goes something like this:
If I say to a friend, “I’m hungry, let’s go to McDonald’s” (or wherever), they’re not allowed to block me without making a counter-suggestion. They can’t just say “No,” they have to say something like “How about Arby’s” instead. This simple rule changes the dynamic of the suggester/blocker to one of the…
When we first integrated AI capabilities into one of our client’s applications, we did it using simple synchronous OpenAI API calls. It worked perfectly for features like text summarization and classification and the implementation was straightforward, responses almost immediate, so simple to debug and test and everything worked as expected.
However, when we began expanding into more data-intensive use cases like large-scale content classification, we realized that our initial solution would spend the budget allocated to AI too fast. What started as a seamless integration, while technically sound, ended up being a financial challenge. So, we needed to come up with a strategy to reduce…
Become a Hanami, Dry and Rom patron
Dear #rubyfriends — today we announce the beginning of a new era for Hanami, Dry and Rom. We are establishing paid, ongoing maintenance for the very first time.
I’m very proud of what we’ve built over our last decade of nights and weekends: an entire ecosystem of impressive breadth: from standalone libraries in Dry, to a powerful persistence toolkit in Rom, all the way to Hanami, the batteries-included framework experience that ties it all together.
Now it’s time to take our work to the next level, to prepare our ecosystem for the next decade and beyond. We need your help to make it happen. We need you and your businesses to become patrons of Hanami, Dry and Rom.
We’re aiming to raise…
The Rails Foundation is pleased to announce that Judge.me is joining the Rails Foundation as our newest Core member, joining Cookpad, Doximity, Fleetio, GitHub, Intercom, Procore, Shopify, 1Passwordand 37signals.
Judge.me is a product reviews platform built with Ruby on Rails at its core. Founded in 2015, the company has grown to support more than 500,000 e-commerce shops across 140+ countries. Every month, Judge.me processes over 70 million orders and generates more than 2 million verified buyer reviews.
Rails has been the foundation of Judge.me’s product since the very beginning. As the platform scaled globally, Rails has remained central to delivering the performance, reliability,…
Understanding Queueing Theory
This is Part 5 of the series of blogs onscaling Rails.
Queueing Systems
In web applications, not every task needs to be processed immediately. When youupload a large video file, send a bulk email campaign, or generate a complexreport, these time-consuming operations are often handled in the background.This is where queueing systems like Sidekiq orSolid Queue come into play.
Queueing theory helps us understand how these systems behave under differentconditions - from quiet periods to peak load times.
Let's understand the fundamentals of queueing theory.
Basic Terminology in Queueing Theory
Unit of Work: This is the individual item needing service - a job.
Server: This is one "unit of parallel…
Junie, a powerful AI coding agent from JetBrains, is available in RubyMine! Install the plugin and try it out now!
Why Junie is a game-changer
Unlike other AI coding agents, Junie leverages the robust power of JetBrains IDEs and reliable large language models (LLMs) to deliver exceptional results with high precision.
According to SWE-bench Verified, a curated benchmark of 500 real-world developer tasks, Junie successfully solves 60.8% of tasks on a single run. This impressive success rate demonstrates Junie’s ability to tackle coding challenges that would normally require hours to complete. This is more than AI – it’s the latest evolution in developer productivity.

Yo…
Hello everyone!
The RubyMine 2025.2 Early Access Program is already available! In this blog post, we’ll share the upcoming features and updates planned for this release cycle.

What’s coming in RubyMine 2025.2?
Debugger improvements
We’re introducing a number of changes aimed at enhancing the debugger installation experience. The entire process will now take less time, and the associated notifications will be less distracting and more informative. Finally, the RubyMine debugger will be updated to support newly released Ruby versions sooner than it previously did.
Better multi-module support
A priority of the upcoming RubyMine release is the provision of support for…
Every other week, the FastRuby.io newsletter brings a curated list of the best Ruby and Rails articles, tutorials, and news to your inbox.
Our engineering team collects links to interesting articles and our marketing team curates them, writes a summary for each article, and creates the newsletter. This process is quite manual, and involves some back and forth to ensure summaries are accurate, engaging, and relevant to our audience.
To make if more efficient, we have developed an AI assistant that helps us curate articles and generate the summaries for the newsletter.
Why an AI Assistant?
We wanted a tool that could reduce the repetitive parts of the workflow without taking away the…
As some of you know, I moved to Orlando in 2020. But it wasn't so much Orlando as Disney World itself, given our home's relative proximity to the parks and the degree to which we're isolated from most of the "Florida stuff" that comes to mind when I tell people I live in Florida.
One of the great joys of where we live is that I've made a variety of fascinating friends who similarly relocated to central Florida with a degree of intentionality, and one of them is Eric Doggett. Eric is a phenomenally talented photographer, artist, and all-around creative. In fact, if you listen to Breaking Change, a big reason it sounds as good as it does is thanks to Eric!
A couple years ago, Eric was…
📸 Try this Milk Sour!

An accident of language—the fact that "sour milk" sounds so unappealing—is probably why nobody in America ever considered making a "milk sour", which is just... exactly what it sounds like.
Milk and liquor, together at last.
Hitting the books
tl;dr I’ve been spending time on foundational skills, like practicing SQL and building an HTTP server from scratch, and next I’ll go back to learning computer science.
A break from building stuff
“Just build stuff.”
That’s what I’ve done over the past two or three years. I spent most of my outside-of-work-programming time (much reduced now that I have children) on “practical” projects such as:
- A CLI framework for doing Advent of Code in Ruby
- A Ruby gem for parsing a reading log
- Learning some Haskell
(That last one is debatable in its practicality 😅)
What to work on next? I’m not sure. I’m stumped…
🚨 Alert: ZJIT Merge — What Ruby | Rails Developers Should Know 🚨
June 2, 2025 The Ruby community has reached a significant milestone with the integration of ZJIT into Ruby core. This next-generation Just-In-Time compiler promises to reshape how we think about Ruby performance in production environments. What Makes ZJIT Different? ZJIT represents a fundamental shift in Ruby's approach to runtime optimization. Unlike previous JIT implementations, ZJIT … Continue reading Alert: ZJIT Merge — What Ruby | Rails Developers Should Know
Path Configuration rules in Hotwire Native provides a way for customising how a view is displayed for a particular URL pattern. Out-the-box it supports customising:
- the view’s
context
(e.g. modal screen) - the view’s
presentation
i.e. how it impacts the navigation stack - functional tweaks, such as “Done” and “Back” button display
The documentation also states: You are free to add more [rule] properties as your app needs, yet it doesn’t mention how you can access them, or how you might use them. So after a bit of digging, and some pointers from Joe Masilotti, here’s what I’ve discovered…
You can access the properties that match a given URL with the following:
Hotwire.config.pathConfiguration.…
And then to…
📍 Tabelogged: 焼肉ニューミート
📍 Tabelogged: マルカドール
Marksmith
📍 Tabelogged: 福炒家
Week 22 - Streaming Turbo Streams Over HTTP, Custom Android Keyboard Extension, and more!

Welcome to Hotwire Weekly!
Welcome to another issue of Hotwire Weekly! Happy reading! 🚀✨
📚 Articles, Tutorials, and Videos
EuRuKo shares 2025 speaker lineup - EuRuKo shared their speaker-line and it also features two Hotwire-adjecent talks:
- "Building interactive Ruby gem tutorials with Wasm – yes, right in the browser!" by Albert Pazderin
- "Introducing ReActionView: A new ActionView-Compatible ERB Engine" by Marco Roth
Hotwire Native Live - Episode #1 - Joe Masilotti walks through building a basic cross-platform Hotwire Native app from scratch using Rails as the backend and starting fresh projects in Xcode and Android Studio. The stream covers setting up iOS and Android apps that load…
Railway Pattern

This pattern is coined from the Railway Oriented Programming presentation — and subsequent book: Domain Modeling Made Functional — by Scott Wlaschin which explains how to pipe functions together in a fault tolerant manner. The good news is Ruby is great at blending objects with functions for maximum effect. In order to learn how to apply this pattern within your own code, we’ll leverage the following foundational gems that make this pattern shine:
-
Dry Monads: Provides low level monad functionality. There are several types of monads included in this gem but we’ll focus on the
Result
monad. -
Pipeable: Implements this pattern by building upon Ruby’s native function…
📍 Tabelogged: ラ トゥール
📍 Tabelogged: 宇都宮 きそば
📍 Tabelogged: とちおとめ×芭莉式
Bites and Bytes – Cheesesteaks and One Month Rails
In this episode of Remote Ruby, Chris and Andrew catch up on recent travels and food experiences, including the best Philly cheesesteaks they’ve ever had. The conversation shifts towards development topics, particularly testing challenges and solutions in Ruby on Rails, featuring discussions about emoji pickers, asset pipelines, and the prawn library. Chris shares updates on acquiring an old Rails app, One Month, and future plans for this project. They also explore various development hiccups and solutions, including using libraries for faster system tests and streamlining asset pipelines. The episode wraps up with insights into new tools like an official Postgres extension for VS Code and…
Hi, Wojtek here. Let’s see this week’s news about Rails.
Final RailsConf
The last RailsConf (July 8 - 10, Philadelphia) will include a fireside chat with DHH, and talks or panel discussions with Rails team members Eileen Uchitelle (Core), Gannon McGibbon (Committers), Hartley McGuire (Issues), and Matheus Richard (Triage), as well as many more new and familiar faces. Tickets are still available.
Introduce Active Job Continuations
Allow jobs to the interrupted and resumed with Continuations.
A job can use Continuations by including the ActiveJob::Continuable concern. Continuations split jobs into steps. When the queuing system is shutting down jobs can be interrupted and their progress…
class ProcessImp…
LLM agents make bad pairs because they code faster than humans think.
I'll admit, I've had a lot of fun using GitHub Copilot's agent mode in VS Code this month. It's invigorating to watch it effortlessly write a working method on the first try. It's a relief when the agent unblocks me by reaching for a framework API I didn't even know existed. It's motivating to pair with someone even more tirelessly committed to my goal than I am.
In fact, pairing with top LLMs evokes many memories of pairing with top human programmers.
The worst memories.
Memories of my pair grabbing the keyboard and—in total and unhelpful silence—hammering out code faster than I could ever hope to read it. Memories of…
Parallax Proves a High-Value Concept and Gains a Predictive Machine Learning Model by Collaborating with OmbuLabs
Parallax was beginning to explore the use of artificial intelligence (AI) or machine learning (ML) to leverage the wealth of data on hand about customer projects, with the goal of improving their resource planning. The company thought it might be possible to create a machine learning model that identifies customer projects at risk, equipping the Customer Success team to make data-driven recommendations on how to head off problems before they occur.
Background
Founded in 2019, Parallax helps digital service organizations optimize operations using sophisticated tools that improve capacity planning and resource planning and management. The Minnesota-based company equips small and…
Giant Robots
A few weeks back I joined Chad on his Giant Robots podcast to talk Ruby, Rails and a bit of business – including our acquisition of Fireside last year. The episode just went live and I hope you enjoy it.
Fun fact: their podcast is actually hosted on Fireside – inception! You can listen wherever you consume podcasts or on Fireside (below) or youtube.
#752 — May 29, 2025
Ruby Weekly

▶ The RubyKaigi 2025 YouTube Playlist — Ruby's 'home' conference, RubyKaigi, is an important entry in the Ruby event calendar. 2025's event took place last month featuring a keynote from Matz and talks from Tenderlove, Koichi Sasada, and many others. There are 57 talks (in English and Japanese) so you’re sure to find something interesting, but I'll link a few highlights below.
RubyKaigi 2025
A FEW RUBYKAIGI TALKS:
-
Matz's keynote is in Japanese, though you can turn on subtitles. It's a high level talk covering thoughts on AI and static typing, and Matz teases…
As we approach the last ever RailsConf July 8 to 10 in Philadelphia, the Rails Foundation is looking forward to joining the Ruby Central and the Rails community to celebrate 20 years of history.
For the final RailsConf, we decided to make the theme The Past, Present, and Future of Rails. We have so many years of rich history to look back on since the very first RailsConf in 2006.
Rails has evolved so much over the years – from the days before Bundler existed, to merging Merb into Rails, to the introductions of ActiveStorage, ActiveJob, etc and now the Hotwire-era. We will celebrate everything that we’ve learned over the years and everyone who has been a part of the community that…
The speaker lineup has been announced, and it’s shaping up to be one for the books, including a fire…
Just like JavaScript, CSS hasn’t the best reputation amongst (Rails) developers. And just like with JavaScript (think Turbo, but also CoffeeScript), CSS has a long history of pre-processors, post-processors and abstractions of it (think Tailwind CSS).
And for a long time many of these layered features where much needed. It is hard to imagine CSS without nesting selectors, is it?
But it is 2025 and CSS has (and is!) improving at a rapid speed. Gone are the days of spacer.gif or creating images for each corner of a card component to mimic border radii.
If you have been neglecting CSS for awhile (because you used Tailwind CSS, for example), below I want to highlight some of the newer CSS…
Ok, I’ll stop after this one, but I said that before. Plenty of fun nerd-sniping on this problem.
I was pointed at Enumerable#partition
(by Brandon, Michael, Piotr & Kasper) which would avoid two of the four loops in the previously “best” solution.
I was also nudged to benchmark my initial “loops” solution by Dave, because straightforward loops are often extremely well optimised at the language level.
So… here’s all the benchmarks for that.
require 'benchmark/ips'
n = 100
a = Array.new(n) { |i| rand(1_000_000) }
b = Array.new(n) { |i| rand(1_000_000) }
Benchmark.ips do |x|
# Pre-filter by odd/even, then compute products
x.report('odd & even') do
(a.select(&:odd?).product(b.sel…
Every time I think the AI frenzy has peaked, it peaks again. Writing about coding these days feels like Jimmy Stewart dancing on the edge of a floor that’s rapidly receding under him.
I had a draft of this that started with five or six capsule stories of interactions with LLMs for coding purposes, some saving incremental time, some being wrong, some even being right.
Then I realized that I probably shouldn’t be that detailed about work stuff, but more importantly, you likely have all these stories too. You’ve seen useful autocorrect, and you’ve seen the LLM be confidently wrong and you’ve seen them be confidently right.
My point is, there’s a lot of ways to feel about LLMs as coding tools.…

Explore a powerful set of tools built around the OKLCH color model—Harmonizer for accessible palettes, Polychrom for Figma contrast checking, apcach for color contrast calculations, and more. Perfect for frontend developers and designers building consistent, modern UIs.
There’s an entire ecosystem of OKLCH tools and content for you to work with right now, and Evil Martians are pioneering the way forward. In fact, Martian CEO Irina Nazarova and Designer Arthur Objartel recently gave a talk at Figma…
Legacy App Modernization: A Case Study in Rails 8 and Rapid Prototyping
My Podcast Subscriptions in 2025
A question by my friend Bodo made me take another look at my podcast subscriptions. Maybe there is something interesting on my list for either Bodo or someone else.
I’m listening to podcasts in both English and German (which are, coincidentally, the two languages I speak). I marked the German ones with the German flag, everything else is in English.
News & Politics
My weekly German news podcast has been Lage der Nation🇩🇪 for quite a while, and I’m a plus subscriber. Unfortunately, I think it has been declining in quality for a bit now. The number of times I’ve been rolling my eyes has been steadily increasing. So I might re-evaluate that choice sometime this year.

Finally, a crane game where the prize is another crane game.
🐒 Monkey Patching in Ruby: What It Is and Why You Should Be Careful
May 28, 2025 Monkey patching is a powerful and controversial technique in Ruby. It involves reopening existing classes and modifying or adding methods directly. Let’s dive into what it is, why it can be problematic, and some better ways to achieve similar goals. What is Monkey Patching? In Ruby, you can add or change the … Continue reading Monkey Patching in Ruby: What It Is and Why You Should Be Careful
Vibe Learning is Underrated

Vibe coding is overrated. Vibe learning, on the other hand, is so underrated.
I’ve always wanted to learn the basics of bookkeeping so I could manage the finances for my company, or at least, stay on top of what's going on financially.
I had tried a couple of times in the past, opened up QuickBooks, clicked around, got confused, and gave up. Always felt like too much for what I was trying to do. I also took a few courses and read books, but they quickly got too complex and overwhelming, and I ended up not finishing any of them. The jargon always threw me off.
Finally, I ended up working with a professional CPA and decided bookkeeping was not for me.
Last weekend, after listening to a…
Elaina Natario returns to talk with Joël about what makes good quality product design and the priorities that shape development.
The pair discuss the importance of certain elements such as security and accessibility, maintaining certain standards throughout development, as well as judging the practical applications of prototypes within a project and the broad role they play.
—
The Sponsor for this episode has been Judoscale - Autoscale the Right Way. Check out the link for your free gift!
You can read more about about inaccessable prototypes here, or listen to the episode Joël mentioned with Aji about different typescripts here!
Your guest for this week has been Elaina…
I’ve recently built a favoriting system for an app. While the code isn’t novel, it reminded me how clean, flexible, and fun Rails can be when you lean into the framework’s conventions. Here’s how I did it - I hope you’ll learn something along the way.
If you want to skip the details and just see the code, you can check out this gist.
The requirements
My team wanted users to mark records as favorite in the system. This would make those records handy for quick access. We needed to support several existing models—and likely more in the future—so it had to be flexible and reusable. Also, multiple users should be able to favorite the same record (some records are “public”,…
Enumerable’s loveliness
I’m often nerd-sniped by the “Interview Question of the week” that Cassidy Williams includes in her weekly newsletter. Typically it’s when I see a solution that show’s off Ruby’s cornucopia of Enumerable
methods. This week’s odd_sum
was catnip.
This week’s question:
Given two arrays, return all pairs (where each number is in each array) whose sum is an odd number.
oddSum([9, 14, 6, 2, 11], [8, 4, 7, 20]);
// > [9, 20], [14, 7], [11, 8]
oddSum([2, 4, 6, 8], [10, 12, 14]) > null;
// (or whatever falsy value you prefer)
The most brute-force “generic language” solution is to do a nested loop over the arrays and check the sum of each pair for an odd result.
def odd_sum(a, b)
res…
After sharing my solution to Cassidy Williams’ oddSum challenge, Xavier & Alex suggested a simpler approach on social media. This got me curious: does avoiding the mathematical check actually improve performance?
So I decided to benchmark the solutions to find out.
require 'benchmark/ips'
n = 10
a = Array.new(n) { |i| rand(1_000_000) }
b = Array.new(n) { |i| rand(1_000_000) }
Benchmark.ips do |x|
# Mine: pre-filter by odd/even, then compute products
x.report('odd & even check') do
(a.select(&:odd?).product(b.select(&:even?)) +
b.select(&:odd?).product(a.select(&:even?)))
.uniq
end
# Alternatives: compute all products, then filter by sum
x.report('full product, +')…
In the testing script I set a variable (n
) for the size of the generated arrays. I presumed that for small arrays there’d be very little difference it would be more noticeable as the arrays grew larger.…
Last year, we started working on SolidTelemetry, a database-backed OpenTelemetry implementation for Rails apps. SolidTelemetry doesn’t just pre-set OpenTelemetry for your application, it also comes with some other cool features:
- stores metrics and traces in your database (PostgreSQL, MySQL, and SQLite3)
- exports CPU, memory, and requests metrics
- adds performance analysis to your application (ala AppSignal)
- adds error tracking to your application (ala Rollbar)
The amount of data it collects is astonishing, as it collects CPU and memory metrics every minute and a lot of spans for every request. It can easily collect thousands of spans per request. Then, the more your application is…

If you’ve been reading Write Software, Well for a while, you know it’s mostly focused on Ruby on Rails, learning practical stuff through real-world examples, reading open source code, and technical deep dives.
For a while, in addition to writing about Rails, I’ve also been itching to write about related topics that happen around the code, such as:
- Running a software services business, which I started just over a year ago and have come to really enjoy. Also, specific thoughts on freelancing, positioning and marketing yourself, finding and working with clients, and growing independent consulting into a steady business.
- AI and how it’s changing the way we work, write, program, and learn. I was a…
How to Use APIs in Ruby: A Step-by-Step Guide with Faraday, HTTParty, and Net::HTTP
May 26, 2025 If you're a Rubyist like me, you know that making an API call can go from a quick one-liner to a full-blown production-ready beast — and everything in between! Let’s take a journey through the best-to-least optimal approaches for making API calls in Ruby, with a dash of humor to keep us … Continue reading How to Use APIs in Ruby: A Step-by-Step Guide with Faraday, HTTParty, and Net::HTTP
Rails’ dom_id
is a useful little helper especially in Rails apps with Turbo. I like to use it as it provides a consistent output for your id-attributes. Not having to think about (and mixing it up) how to structure even an id-attribute is just one of those things I enjoy about Rails.
This is how it is used:
<%= turbo_frame_tag dom_id(message, :votes) do %>
<%= button_to "👍", votes_path, params: {message_id: message, vote: "up"} %>
<%= button_to "👎", votes_path, params: {message_id: message, vote: "down"} %>
<% end %>
As a small aside: turbo_frame_tag
’s first arguments takes any representation of a string as an array as the id. So above cóuld be rewritten as turbo_frame_tag message,…
And that would both render:
<turbo-frame id="votes_me…
For some recent client work, I needed to create a PDF out of a webpage. I already had CSS to create the underlying design, so all I really needed to do was set the page size, and add some header and footer images to each page.
As of late 2024, all the major browsers now support the @page
CSS rule, which works like the @keyframes
rule in that it lets you created named pages, and give those pages set dimensions and margins. Then you can apply that rule to some DOM element using the page:
CSS property. As long as you set page-break-before:
(or after
or inside
) to put the elements on a new page, those rules will apply to that printed page.
There are some big and annoying caveats to all of…
Enumerable’s loveliness
I’m often nerd-sniped by the “Interview Question of the week” that Cassidy Williams includes in her weekly newsletter. Typically it’s when I see a solution that show’s off Ruby’s cornucopia of Enumerable
methods. This week’s odd_sum
was catnip.
This week’s question:
Given two arrays, return all pairs (where each number is in each array) whose sum is an odd number.
oddSum([9, 14, 6, 2, 11], [8, 4, 7, 20]);
// > [9, 20], [14, 7], [11, 8]
oddSum([2, 4, 6, 8], [10, 12, 14]) > null;
// (or whatever falsy value you prefer)
The most brute-force “generic language” solution is to do a nested loop over the arrays and check the sum of each pair for an odd result.
def odd_sum(a, b)
res…
📸 Forbidden Button

I have never wanted to press a button more than I want to press this button

Welcome to Hotwire Weekly!
Welcome to another issue of Hotwire Weekly! Happy reading! 🚀✨
📚 Articles, Tutorials, and Videos
Adding Text Highlights and Notes in Rails with Hotwire - Nicolás Galdámez shows how to implement inline text highlighting and note-taking in a Rails app using Turbo Frames and Stimulus. Highlights are rendered with <mark>
tags, and notes are attached via Turbo-powered dialogs and hoverable frames.
The Frustrations of React and the Power of Turbo - Andrew Mason and Chris Oliver discuss their frustrations with React's complexity and highlight the advantages of using Hotwire for building Rails applications.
Inertia Rails with Shadcn UI - Ken Greeff walks through adding…
In a previous post about ractors, I explained why I think it’s really unlikely you’d ever be able to run an entire application inside a ractor, but that they could still be situationally very useful to move CPU-bound work out of the main thread, and to unlock some parallel algorithm.
But as I mentioned, this is unfortunately not yet viable because there are many known implementation bugs that can lead to interpreter crashes, and that while they are supposed to execute in parallel, the Ruby VM still has one true global lock that Ractors need to acquire to perform certain operations, making them often perform worse than the equivalent single-threaded code.
One of these remaining contention…
You want to work on some project, but they use a branch named dog
and you
want to use cat
instead. So you go:
git checkout dog
git switch -c cat
git branch --set-upstream-to=origin/dog
git branch -d dog
Your local branch is now cat
and it tracks dog
. Whenever your dog-loving
friends push their work, you can just use
git pull --rebase
and your cat
branch will be updated with the new commits in origin/dog
.
Now, the time comes to push your own work, and you go:
git push
Now, however, something perhaps unexpected happens. Instead of your commits
getting pushed to dog
, a new branch cat
is created in the remote
repository. That’s not what you wanted!
To make this work properly, you have to…
Hello! Emmanuel Hayford here.
The third edition of Rails World is a couple of months away! In case you missed it, The Rails Foundation has already announced an exciting lineup that you should check out in case you haven’t seen it yet.
Document through
with polymorphic
A new addition to the Rails documentation clarifies that polymorphic associations are not supported as :through associations. While Active Record already raises an error when such a setup is attempted, the exceptions were previously undocumented. This update makes the restriction explicit in the docs.
Deprecate :class_name
for polymorphic belongs_to
Passing :class_name
to a polymorphic belongs_to
is now deprecated and will…
📸 Like a Yakuza

Was hunkered down at a cafe in Yokohama's Chinatown earlier this week while waiting for Becky to finish a workout and looked up from my Steam Deck to notice I was simultaneously standing under the same gate in Like a Dragon: Yakuza's
The Frustrations of React and the Power of Turbo
In this episode of Remote Ruby, Andrew and Chris discuss the frustrations of working with React and the advantages of using Hotwire. They also talk about upcoming plans, including Andrew's retreat to Philadelphia and Lancaster, and the new features they've been working on, like an inbox for notifications. The conversation touches on the complexity of maintaining large Ruby on Rails applications and the new features in the latest Ruby release. Chris shares his experience at a Post Malone concert, and some tips on maintaining productivity by rearranging workspaces. Hit download now to hear more!
Links
We dove deep into his latest creation: RubyLLM, a Ruby gem that simplifies working with large language models (LLMs) like GPT-4, Claude, and Gemini. Think of it as an intuitive, plug-and-play toolkit that lets Ruby developers tap into powerful AI features — chat, image generation, embedding, tools, and even multi-model support — with just a few lines of code. And yes, it’s as awesome as it sounds.
K…
#751 — May 22, 2025
🖊️ A slightly shorter issue than usual this week as I've been on-site at Google I/O for the past couple of days (no Ruby related announcements there, alas!). Back to full speed once I'm home next week!
__
Peter Cooper, your editor
Ruby Weekly

Fast Allocations in Ruby 3.5 — Tenderlove never rests! His latest post shows his work in Ruby 3.5 for slashing object‐allocation costs (up to 6× faster for keyword-heavy constructors). He walks us through the techniques behind this win and leaves us buzzing for 3.5’s eventual release later this year.
Aaron Patterson

Today I want to explore how to recreate (most of) GitHub’s markdown-powered textarea. It is a feature I want to add to Rails Designers (private community for Rails UI engineers) and thought it would be nice to share my first version with you.
I like this approach as the HTML’s textarea is available in all browsers and can be used to write any comment, prose or whatever else needed with markdown. JavaScript is not needed, but if present it enhances the experience a fair bit.
What I intend to add today:
- basic formatting options (bold, italic, etc.);
- paste urls to markdown;
- fetch page title from URL;
- drag & drop images to upload with ActiveStorage.
Direct link to podcast audio file
Coming to you LIVE from a third straight week of Japanese business hotels comes me, Justin, in his enduring quest to figure out how to exchange currency for real estate in the land of the rising fun.
[Programming note: apologies, as the audio quality at the beginning of the podcast suffered because I fucked up and left the hotel room's air conditioner on (I caught it and fixed it from the pun section onward)]
Had a few great e-mails to read through this week, but now I'm fresh out again! Before you listen, why not write in a review of this episode? podcast@searls.co and tell me about how amazing it will be before it lets you down like your best…
Fast Allocations in Ruby 3.5
Many Ruby applications allocate objects. What if we could make allocating objects six times faster? We can! Read on to learn more!
Speeding up allocations in Ruby
Object allocation in Ruby 3.5 will be much faster than previous versions of Ruby. I want to start this article with benchmarks and graphs, but if you stick around I’ll also be explaining how we achieved this speedup.
For allocation benchmarks, we’ll compare types of parameters (positional and keyword) with and without YJIT enabled. We’ll also vary the number of parameters we pass to initialize so that we can see how performance changes as the number of parameters increases.
The full benchmark code can be found expanded…
Eu normalmente não ligo de documentar sobre problemas bobos de Windows, mas este em particular me deixou irritado, então vou relatar a sequência de eventos. Mas já deixo o spoiler do final: abra Control Panel e Power Options no seu Windows e cheque se ele não está em "Power saver" mode. Tire desse lixo, deixe no mínimo em Balanced, mas se for PC Desktop suba pra "High Performance" ou "Ultimate Performance". Depois me agradeça.
Agora senta que lá vem história.
Eu montei um PC até que razoável pra minha namorada: Intel i7 12th Gen de 8 cores, 32GB DDR4-2400, NVIDIA RTX 3090, placa-mãe MSI Edge z790, NVME e até coloquei um NAS Synology DS1621+ em rede 2.5Gbps - porque ela é criadora de…
It’s TRUE, SQL Supports Booleans
When working on Rails applications, almost all of the queries I write use Active Record.
class Post
scope :published, -> { where(published: true) }
end
Post.published.to_sql
# => SELECT "posts".* FROM "posts" WHERE "posts"."published" = TRUE
However, sometimes queries are complex enough that they need to be written by hand. This can make it difficult for an application to maintain one of the more interesting benefits of using an ORM (Object-Relational Mapping): database agnosticism.
Let’s pretend the query above can’t be written with standard Active Record and needs to use some plain SQL. For MySQL, that may look like this:
Post.where("published = 1").to_sql
# => SELECT `posts`.*…
T…
Rails 8 got even better for developers who love clean CLI workflows.
You can now customize the command-line tool used by rails dbconsole
with the new config.active_record.database_cli
setting.
Prefer pgcli over the default psql
to connect to your database? Make your dev experience smoother with autocomplete and syntax highlighting:
# config/initializers/database_cli.rb
Rails.application.configure do
if Rails.env.local?
config.active_record.database_cli = {postgresql: "pgcli"}
end
end
Available since Rails 8.0.0.beta1 — check out the pull request for full details and start customizing your database workflow today.
Benedikt used to be a freelance software engineer and co-founded Userlist in 2017 as a side project with his co-founder Jane Portman. They went full-time on it in 2020. Benedikt enjoys database query optimization just as much as pushing around pixels on the front-end
Show Notes
Sponsors
Hosting for The Ruby on Rails Podcast is provided by Fireside.fm. If you want to start a podcast and are looking for hosting, visit fireside.fm/rails to get started.
Alright, let’s talk about deploying code without having a full-blown panic attack. You ever push something live and immediately…
Welcome to Once a Maintainer, where we interview open source maintainers and tell their story.
This week we’re talking to William Woodruff, contributor to Homebrew, PyPI, and creator of several open source tools including zizmor, a static analysis security tool for Github Actions. William is currently Engineering Director at Trail of Bits, a security research and consulting firm in New York.
Once a Maintainer is written by the team at Infield, a platform for managing open source software upgrades.
How did you get into coding?
I don’t actually have an academic background in software, really. My degree is in Philosophy. I got into it as a hobby when I was a high schooler. I had a computer and I…
I’ve needed this before - a couple of times, just like that other thing. A situation where I am doing uploads using AJAX - or performing some other long-running frontend tasks, and I don’t want to overwhelm the system with all of them running at the same time. These tasks may be, in turn, triggering other tasks… you know the drill. And yet again, the published implementations such as p-queue and promise-queue-plus and the one described in this blog post left me wondering: why do they have to be so big? And do I really have to carry an NPM dependency for something so small?
Turns out - not really. It’s just that a promises queue is a delicate thing conceptually to get “just right”. Once…
I will make my very first appearance at a conference as a speaker on May 23rd, 2025, at Helvetic Ruby in Geneva, Switzerland.
Helvetic Ruby is co-organised by our thoughtbot alumni Dimiter Petrov since 2023, and I am very excited to be part of this event. There are still tickets available, and I would love to meet you there!
I will be giving a talk about modelling the cosmos in Ruby, and how I used Domain-Driven Design to build Astronoby, a Ruby gem that helps you calculate astronomical data and events in pure Ruby.
Don’t hesitate to reach out to me, I would love to chat about programming, astronomy, funk music, great food, and anything else that comes to mind.
If you enjoyed this post,…
While Python is often considered the primary language for AI, Ruby on Rails offers an effective and efficient approach to developing AI-powered applications. The most impactful AI solutions often come from applying proven AI to real-world problems, not necessarily from groundbreaking AI research. At SINAPTIA, we leverage the speed of Ruby on Rails and the strategic integration of existing AI models to deliver intelligent applications that drive business results.
Key advantages for AI application development
Building applications is an iterative process of experimentation, prototyping, and refining AI model integration based on performance and user feedback. Even more so now that the AI…
April 2025 RubyGems Updates
Welcome to the RubyGems monthly update! As part of our efforts at Ruby Central, we publish a recap of the work that we’ve done the previous month. Read on to find out what updates were made to RubyGems and RubyGems.org in April.
RubyGems News
In April, we released RubyGems 3.6.7, 3.6.8 and Bundler 2.6.7, 2.6.8. These releases bring a series of enhancements and bug fixes designed to improve the overall developer experience with RubyGems.
Notable improvements include defaulting to a SOURCE_DATE_EPOCH
of 315619200
to simplify reproducible builds, sorting gemspec metadata fields to support consistent build outputs, fixing a crash when the compact index API only listed versions, and speeding…
Some other important accomplishments from the team this month…
✅ Building Clean and Reusable UI with ViewComponent in Rails
May 20, 2025 As Rails applications grow in size and complexity, maintaining views can become challenging. Traditional partials and helpers often lead to scattered logic, reduced testability, and hard-to-maintain code. This is where ViewComponent—a gem developed by GitHub—comes in to bring structure and object-oriented design to your views. Need help with your Ruby on … Continue reading
Building Clean and Reusable UI with ViewComponent in Rails

Conventional thinking says only tech giants with massive resources can compete in AI image generation. But startup Recraft is proving this wrong, carving out big market share with a small team and strategic thinking.
In the high-stakes world of AI image generation, conventional wisdom suggests that only tech giants with massive resources can compete. Yet female-led London-based startup Recraft is proving this assumption wrong, carving out significant market share with a lean team and strategic thinking. Their…
The third edition of Rails World is fast approaching with only 107 more days to go, so it’s time to meet the speakers who will join us this year in Amsterdam.
We had a record number of speaker submissions this year, so thank you to everyone who applied. This lineup was ultimately selected for their unique technical viewpoints covering what is new in Rails, how to make the most of the framework today, and where Rails is headed in the future.
Here is our 2025 speaker lineup:
Keynotes and talks by Rails Team members
Sessions
In this guide, we'll harness AppSignal to detect, diagnose, and remove performance bottlenecks and employ proper tracing in a Ruby on Rails application. From setting up tracing to capturing errors and logging, we’ve got you covered.
We'll ensure our application runs smoother than ever, even under the heaviest loads!
But first, let's quickly touch on how to define tracing and its benefits.
What Is Tracing?
Tracing is the process of following a request and operation through an application. In Ruby applications, tracing captures the execution flow, providing deep insights into the performance of various components.
Benefits of Tracing
Tracing has several benefits, including:
- Performance…
Joël and Rémy draw inspiration from the stars as they discuss Rémy’s new open source Ruby gem, Astonoby.
Rémy reveals the challenges he faced in taking on this project, the scientific translation work that went into making it accessible for everyone, as well as the key lessons he learnt from modelling the cosmos.
—
The Sponsor for this episode has been Judoscale - Autoscale the Right Way. Check out the link for your free gift!
If you’re enthusiastic about space and want to try out Rémy’s new gem tool, you can find it here. Alternatively you can read more about astronomical computing here.
Your host for this episode has been thoughtbot’s own Joël Quenneville and was…
2025-06-02 Update: Fukui, ✅!
2025-06-01 Update: Ibaraki, ✅!
2025-05-31 Update: Tochigi, ✅!
2025-05-29 Update: Fukushima, ✅!
2025-05-28 Update: Yamagata, 🥩!
2025-05-25 Update: Gunma, ✅!
2025-05-24 Update: We can check Saitama off the list.
So far, I've visited 42 of Japan's 47 prefectures.
I've been joking with my Japanese friends that I'm closing in on having visited every single prefecture for a little while now, and since I have a penchant for exaggerating, I was actually curious: how many have I actually been to?
Thankfully, because iPhone has been equipped with a GPS for so long, all my photos from our 2009 trip onward are location tagged, so I was pleased to find it was pretty…

Associations were one of the first things in Rails that clicked for me. An employee belongs to a company? A company has many employees? Incredible. That’s exactly how I was imagining the architecture. Took the words right out of my mouth, Rails!
There are several different types of associations in Rails:
- belongs_to
- has_one
- has_one :through
- has_many
- has_many :through
- has_many_and_belongs_to_many
But what we’ll be focusing on for this post is the has_one :through relationship. This sets up a 1-to-1 relationship between two models with an intermediary model. Here is an example:
class Pet < ApplicationRecord
has_one :cat
belongs_to :home, optional: true
# has a column for home_id
end
class Cat <…
Pros and Cons of Going from Individual Contributor Back to Manager
There’s much written about becoming a first time Engineering Manager (I recommend Camille’s book), but little about the second time.
To my own surprise, I am back to being a manager after almost 6 years of writing code as an individual contributor (IC). Two months ago I joined the Developer Productivity organization at Shopify to create a new team called “Augmented Engineering”. We’ve been busy building, and have recently released an open-source tool to execute structured A.I. workflows, called Roast. This post is not about A.I., so let’s get back to talking about my motivations, and the pros and cons of going back from IC to Manager.
The Manager Path
My manager path was a typical one. I…
Eu assisto MUITO YouTube, e fico sempre compartilhando coisas legais que assisto no meu X e Instagram (me sigam lá). Tem vários videos que vira e mexe eu volto atrás.
Finalmente resolvi compilar uma lista com os canais que eu mais assisto e uma lista das principais playlists e exemplos de videos de cada canal que recomendo assistir.
Provavelmente vou ficar voltando nesta página pra atualizar de tempos em tempos. Se alguém se lembrar de algum que eu esqueci, mandem nos comentários. Tem canais como GameSack ou Sega Lord X ou Retro Game Corp ou Wullfden ou Macho Nacho Productions e vários outros assim que não listei, porque são mais de "reviews" e não cruzam tanto com "dev". Tentei focar em…