Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Today
Kill SSH on ECS: get a Rails console via ECS Exec with Terraform
Still keeping port 22 open and a key pair in your launch template just so someone can run rails console in staging? This guide walks through replacing SSH with AWS SSM Session Manager and ECS Exec using Terraform. It covers IAM for instance and task roles, VPC endpoints for private subnets, exec logging, rolling it out through CI, and the gotchas that eat the most time: tasks that predate enable_execute_command, log groups created by hand, and TargetNotConnectedException. It ends with a troubleshooting table and a checklist for production.
I've made a experimental 3d engine that uses mruby
I’ve been building a small 3D game engine using mruby: https://github.com/carlosdanielpohlod/redgem The engine is written in C++, but I wanted Ruby to be the main way to build games with it. It has physics, a 3D editor, Blender level import, and a few other things. It’s still a work in progress, and I used AI quite a lot to help build it. There’s definitely room for improvement, but I thought it would be interesting to share it with the mruby community. Read more
DHH, AI, and the Future of Rails
I was in the audience in Austin when DHH opened Rails World 2026. The conference tagline was “Shaping the future of Ruby on Rails,” so I walked in expecting to hear about the future of Rails. Read more
introducing runsheets, an executable runbook
runsheets is a Ruby gem that serves markdown runbooks as a local web page. Fenced code blocks you mark as runnable get a Run button. Every run is written to a “runsheet” (aka session log) that records each command exactly as it ran, its output, its exit status and timing, and each time the operator signs off on a manual step. Secret inputs are redacted from the output, and a destructive block won’t run until the operator types a confirmation code. runsheets --check lints a runbook, --new builds one from templates, and --run runs a single step from the terminal. It’s a proof of concept, and I’d like feedback from people who use runbooks every day. Install it with gem install runsheets (it needs Ruby 3.4 or newer), and see the docs for more.
LLMCostTracker 0.15.0: per-run budgets for agents, RubyLLM 2.1, more providers
LLMCostTracker records the LLM calls your Rails app makes through RubyLLM, the official OpenAI and Anthropic SDKs or Faraday into your own database: priced per call, tagged by user, feature or any tag, with budgets and a dashboard. No proxy, no prompts stored. Read more
Deploying a Rails 8 App to a VPS with Kamal 2: A Practical Guide
A start-to-finish walkthrough of shipping a Rails 8 app to a single VPS with Kamal 2, using Vite, Solid Queue, PostgreSQL as a Kamal accessory and Docker Hub. It focuses on the errors you will probably hit: a Dockerfile with no Node.js, a database.yml that falls back to localhost, SOLID_QUEUE_IN_PUMA=false turning the Puma plugin on, uncommitted changes that Kamal never builds, and Let’s Encrypt failing on DNS. It ends with what Kamal leaves to you: backups, HA and Postgres major upgrades. Read more
Ruby implementation of scrap: scrap4rb
While searching for quality I found scrap. SCRAP is by Robert C. Martin (Uncle Bob): github.com/unclebob/scrap. The algorithm, the metrics, the smells and the policy numbers in scrap4rb come from SCRAP. scrap4rb is a Ruby implementation. It contains no SCRAP source code. Link to repo: https://github.com/roberthopman/scrap4rb Link to post: https://roberthopman.com/scrap4rb-find-the-messy-tests/
Farce 0.1.0: A new library for working with Ractors and Fiber Schedulers
Farce is a new library for Ractor-shareable, Fiber Scheduler-compatible, concurrent data structures, with support for software transactional memory and a concurrency-model agnostic scheduling API.
Workhorse, a durable PostgreSQL task queue for Ruby and Rust
Workhorse keeps your background jobs in PostgreSQL and runs them in Ruby, TypeScript, Python, Go and Rust. Read more
What Should Go in AGENTS.md for a Rails App?
After working with agents and agent files for tons of apps, repos, projects, I decided to distill my thoughts on it: Read more
rails-preflight: what stands between your Rails app and the next version
I just released a gem that answers one question about a Rails app: what stands between it and Rails X? Read more
Callbacks, Concerns, and Current: Avoiding Hidden Dependencies in Rails
Callbacks, concerns, and Current keep code close to the model, but can hide effects and dependencies. When to use them and how to make those dependencies explicit. Read more
Fixing SPA Link Previews with a Lambda in Front of AWS Amplify (and Why Rails Never H
Link preview crawlers don’t run JavaScript, so every route of a static SPA shares the same generic card. In Rails, a content_for :head block solves this per request. Without a server in the request path, you have to put one back. Read more
Rails 8 with Inertia and React: Hotwire Alternative Guide
Building a Rails 8 admin panel with Inertia and React instead of Hotwire: the trade-offs, the architecture, and a practical tutorial.
Shrinking a 130 GB Postgres to a Local Copy with Greenmask: What Worked and What Brok
Staging had grown past 130 GB, a full pg_dump was out of the question, seeds never reproduced real bugs, and the data was full of PII. This post walks through building a small, FK-consistent, masked subset of a Rails app’s Postgres with Greenmask. It covers virtual references for Rails associations that never got a database FK, and masking every user to user<ID>@example.test with a known dev password. It also goes through the six things that broke and how each was fixed: NULL-owner rows slipping through, a self-referencing FK that panics the planner, invalid SQL from polymorphic references, orphan rows, the source running out of temp space on a 70 GB table, and a PostGIS NOTICE that aborts the restore. The result is a repeatable pipeline: restore by section, run a repair pass before the FKs are created, then verify.
Hot Cell for Active Storage
This summer, Mike handled CVE-2026-66066, an Active Storage vulnerability that let a crafted image upload read files from the server, including your application’s secrets. Read more
Don't bet on SELECT's order: shuffle your rows and see what folds
SELECT * FROM posts carries no promise about the order of the returned posts. Yet, every relational database hands them back in some order, and code and tests start depending on that order. You can’t grep for a bug like this, but you can smoke it out by deliberately shuffling the rows of every unordered query and seeing what fails. (Rails has since merged a switch of its own from Evil Martians, config.active_record.shuffle_unordered_selects, due in 8.2.) We also share pg_disorder, the open-source PostgreSQL extension we built to do the same thing at the database level. Read more
Brunch Gem: Isolated Development Environments for Git Branches and Worktrees
Brunch is a Ruby gem that gives Git branches and worktrees isolated development environments. Each branch can have its own containers, network, volumes, and persistent state, while each worktree gets its own host port. This makes it easier to switch between branches safely and to run multiple worktrees in parallel, including workflows driven by IDEs and coding agents. Read more
What retry_on Actually Means
A Rails job sends a webhook, then fails while saving its receipt. Trace what retry_on repeats, how attempts are counted, and how a failed retry enqueue behaves in Active Job 8.1.3, with a runnable reproduction and explicit Solid Queue differences. Read more
Rails World '26: The As-If Rule, Ractors & AI
I was in the audience at Rails World 2026 when Aaron Patterson (tenderlove) kicked off the closing keynote. Aaron opened with a well-worn line: “the purpose of a system is what it does.” He wasn’t satisfied with it. The purpose of a system, he argued, is what it does for whoever is observing it. Read more
The Future of Rails
A special edition of The Ruby AI Newsletter breaks down the Future of Rails now that AI can write most of the code, and all of the incredible developments since Rails World.
Testing JSON APIs in Rails
Chapter 16 of the free Minitest Rails guide is out now. Learn how to build a versioned API at /api/v1 and test full API: Read more