Blogs
Running Migrations Once During a Multi-Host Kamal Deploy | t27duck
Using a pre-deploy hook can prevent ActiveRecord::ConcurrentMigrationError when multiple web containers boot at the same time.
At my day job, we deploy our Rails app in production to three separate web hosts using Kamal. Each container runs bin/do...
How to Leverage PurgeCSS in Your Rails App for Faster Stylesheets - FastRuby.io | Rails Upgrade Service
Large Rails apps often ship CSS bloated with unused framework classes. Learn how to add PurgeCSS to your asset pipeline to strip dead styles and speed up page loads.PurgeCSS is a tool that analyzes your content and CSS, then removes unused CSS sel...
Beyond Enumerable: Heaps and Priority Queues | baweaver
Our last post named windows: moving through a collection while maintaining running state. This one goes after a different shape, one that shows up the moment a collection won’t sit still long enough for sort_by to help.
Enumerable gives you min_b...
Small PRs, big speedups: The Ruby performance work you almost missed - Closer to Code
The Ruby performance PRs worth knowing about - fast paths, fewer allocations, and benchmark-backed speedups across strings, files, GC, and the JIT.Normally I just fire off a tweet when I spot a nice performance PR landing in Ruby. Lately I've been...
Tejas' Blog - Implementing account-specific rate limits in Rails
We can easily configure global rate limits, but how can we make them dynamic?
In a previous post I explored how to add account-specific IP whitelisting in a Rails/rack app. This post explores similar problem space, this time adding per-account ra...
How to Choose a Gem Wisely (To Prevent a Maintenance Nightmare)
Imagine this scenario: a developer added a pub/sub gem built on top of Sidekiq to handle background event broadcasting in your company’s Rails app. At the time, it was a huge win: instead of building a custom job orchestration system, they could d...
Beyond Enumerable: For Want of Better Windows | baweaver
Enumerable is probably one of, if not the most, powerful features of Ruby. It condenses several useful iteration patterns into more common language and allows us to focus on the problem at hand directly rather than by its component pieces like we ...
My Agent Skill for Test-Driven Development - SaturnCI - Continuous Integration for Ruby on Rails
AI agents tend to be, at least as of this writing, lousy at writing tests. The tests they write are often vague, cryptic, overcomplicated, hacky, disorganized, tautological, performative, perfunctory and downright pointless.
Unfortunately, I don'...