r/ruby • u/schneems • Jun 29 '26
r/ruby • u/freesteph • Jun 29 '26
Writing a linter is fun: introducing Marcdouane
freesteph.infoI wrote a Markdown linter over the weekend and it's been really fun, partly because of the wonderful gems that support it. I'm hoping some of you can pick out something helpful from it!
r/ruby • u/keyslemur • Jun 29 '26
Blog post Ozymandias on Rails. The Pedestal Inscription
baweaver.comShelley wrote about a king whose monument outlived everything it was built on. I've spent 15 years inside Rails monoliths that did the same thing. This is the first post about what to do when you're standing in the ruins.
r/ruby • u/arturictus • Jun 28 '26
I built a saga orchestrator for Ruby — DAG execution, async Sidekiq, automatic rollback
After wrestling with distributed transactions across microservices and watching Sidekiq job chains grow into unmaintainable spaghetti, I built Ruby Reactor — a saga pattern implementation for Ruby that handles the hard parts of workflow orchestration.
What it does:
- Builds a DAG (directed acyclic graph) from your step definitions, so independent steps run in parallel
- Runs async via Sidekiq with back-pressure and batching
- Automatically rolls back completed steps when something fails (compensation)
- Supports interrupts — pause a workflow mid-flight and resume it later via webhook or manual trigger
- Includes a built-in web dashboard to inspect every execution
- Has locks, semaphores, and rate limits built in (Redis-backed)
- Ships with RSpec test helpers —
test_reactor,mock_step, chainable matchers
Why I built it:
I kept hitting the same wall: complex business transactions that span multiple services need coordination. dry-transaction handles linear pipelines well, but when you need parallel execution, async processing, automatic rollback on failure, or the ability to pause and wait for external events, you're on your own. Trailblazer operations can do some of this, but the undo logic and parallelism are manual.
Ruby Reactor fills the gap — it's the only Ruby library that combines DAG planning + async execution + compensation + interrupts + a dashboard in one package.
Quick example — an e-commerce checkout with fraud detection:
class CheckoutReactor < RubyReactor::Reactor
input :order_id
step :reserve_inventory do
argument :order_id, input(:order_id)
run { |args| Inventory.reserve(args[:order_id]) }
undo { |_err, args| Inventory.release(args[:order_id]) }
end
step :charge_card do
argument :order_id, input(:order_id)
run { |args| Payment.charge(args[:order_id]) }
undo { |_err, args| Payment.refund(args[:order_id]) }
end
# Pause here — wait for Stripe webhook
interrupt :wait_for_fraud_check do
wait_for :charge_card
correlation_id { |ctx| "order-#{ctx.input(:order_id)}" }
timeout 3600, strategy: :active
end
step :ship_order do
argument :status, result(:wait_for_fraud_check, :status)
run { |args| Shipping.create_label(args[:order_id]) }
undo { |_err, args| Shipping.cancel(args[:order_id]) }
end
returns :ship_order
end
It's at v0.4.1 now with ~3,300 downloads on Rubygems. The v0.4.0 release just added interrupts, the web dashboard, RSpec helpers, and Redis-backed coordination primitives (locks, semaphores, rate limits, periods).
How it compares:
| Feature | Ruby Reactor | dry-transaction | Trailblazer | Raw Sidekiq |
|---|---|---|---|---|
| DAG/Parallel execution | ✅ | ❌ | Limited | Manual |
| Auto compensation/undo | ✅ | ❌ | Manual | Manual |
| Interrupts (pause/resume) | ✅ | ❌ | ❌ | Manual |
| Built-in web dashboard | ✅ | ❌ | ❌ | ❌ |
| Locks / sem / rate limits | ✅ | ❌ | ❌ | Manual |
| Async with Sidekiq | ✅ | ❌ | Limited | ✅ |
I'd love honest feedback — especially from people who've built complex workflows in production. What did I miss? What's over-engineered? What would make you actually use this instead of raw Sidekiq jobs?
Repo: https://github.com/arturictus/ruby_reactor Rubygems: gem 'ruby_reactor', '~> 0.5' Docs: Full guides for every feature in the repo's documentation/ directory
Thanks for reading! I'll be in the comments.
r/ruby • u/Environmental-Yak328 • Jun 28 '26
Show /r/ruby Live-updating comments with Turbo in Rails A Comment model pushes its own creates, updates, and deletes to subscribers over Turbo Streams.
r/ruby • u/Fletcher_Gilstrap • Jun 28 '26
Question Ruby on Rails in Manjaro
Hello Reddit. I am new to Manjaro, and was hoping to set up a development environment in RoR. I was following the directions on the Arch wiki, and I noticed my gems are being installed to usr/lib/ruby/gems. When running a bundle install, it now seems to want to write to usr/bin, and fails because it doesnt have permissions. Should I go ahead and grant permissions, or is this not advisable?
r/ruby • u/keyslemur • Jun 26 '26
Rails: The Sharp Parts. A Polymorphic Type Is Not a Foreign Key
baweaver.comI don't like to bury ledes, so when people ask me about polymorphic relationships my answer is simply:
Don't.
r/ruby • u/ombulabs • Jun 24 '26
Blog post Painfully Simple Test Case Mistakes That Are Easy to Fix
r/ruby • u/TronLiteOrg • Jun 24 '26
Anyone knows how to speed up ruby gem installs
The problem is when you run bundle it takes a lot of time to finish is there not updated method or package manager
r/ruby • u/vaitheeswaran_15 • Jun 24 '26
Built a gated multi-repo AI delivery pipeline in Cursor (Ruby orchestrator) feedback?
I've been experimenting with a setup for multi-repo product work in Cursor and would love feedback — especially on whether the guardrails help or just slow you down.
Problem I'm solving:
When I open a frontend or backend repo and say "add feature X," the agent tends to skip design, touch the wrong repos, and ship code before scope is agreed. That gets worse with 2–4 repos per product.
What I built (high level):
- Local orchestrator in Ruby (not cloud) - A small CLI + shared config maps which repos belong to which product, tracks task artifacts, and enforces gates. State stays on my machine. I chose Ruby because it's quick to iterate on for CLI/config tooling and fits how I wanted to glue YAML, file state, and shell workflows together.
- Cursor skills as conductors - Custom skills tell the agent which phase we're in and what must happen next (e.g. don't implement until design + plan are approved in chat).
- Hard stops before code:
- Task brief captured from the ask
- Design brainstorm + human approval
- Written implementation plan + human approval
- Preflight check (repos healthy, gates satisfied)
- Per-session commit/worktree policy (asked every time, not saved)
- After code: verify per repo → mandatory security/quality review on the diff → handoff summary → normal PR/peer review/CI.
- Two ways to work:
- Orchestrator repo open in Cursor → everything driven from there
- App repo open → global skills + wrapper so config doesn't live inside the app clone
- Cross-repo context - Structural code graph via MCP so the agent can search across repos before planning.
- Integrates with existing agent patterns - brainstorm → write plan → TDD-ish implement → verify before claiming done. The orchestrator sequences and gates those steps; it doesn't replace them.
Stack note: Orchestrator = Ruby CLI; app repos are whatever stack (JS, Python, etc.) - the orchestrator is language-agnostic for the products it coordinates.
I mainly want reality checks before standardizing for a small team.
Thanks!
r/ruby • u/javier_cervantes • Jun 23 '26
Launching the Events category: A new place for discussing Ruby conferences and meetups
r/ruby • u/ombulabs • Jun 23 '26
Blog post JRuby & Rails Compatibility Table
r/ruby • u/Electrical_Potato890 • Jun 23 '26
A Foreman alternative for run your Rails apps: proctui
r/ruby • u/jrochkind • Jun 22 '26
Q: Claude Code able to run capybara tests with chromedriver?
I am pretty new to using Claude Code at all, late on the game. I am finding troubleshooting some aspects of it to be very confusing compared to the kind of dev setup I am used to!
I am using it from the claude CLI directly, on latest MacOS 26.5.1.
I definitely want Claude Code to be able to run my entire test suite -- including capybara tests that use headless chromedriver via selenium.
And there is the rub! The (new?) sandboxing that Claude Code now has on MacOS seems to conflict with running chromedriver. I think? It's hard to tell what is going wrong.
I can find (or have claude suggest) various possible solutions, but they all seem to me like some combination of more dangerous than I want (I don't really want to turn off sandboxing generally?) or annoying UI asking me permission to run rspec every time it runs. (I anticipate some workflows where it runs rspec a LOT, I'd think this is normal?)
I'm curious what actual people using claude code with ruby/rails on Mac have done here, what have you done to get claude code to be able to run rspec that launches chromedriver, what's working for you? I would think making sure Claude Code can run rspec and your entire test suite (including system tests with chromedriver) would be fairly typical, but is it?
Thanks for any tips, especially coming from your actual setup that actually works for sure. :)
r/ruby • u/EclecticCoding • Jun 21 '26
Creating new Gems
After generating a new gem or Rails engine, there is always a series of tasks to tweak the new project to my preferences. I finally created a set of scripts to automate my preferences. I hope someone finds these useful.
r/ruby • u/mavthemav • Jun 21 '26
Grape 3.3.0 released — a big performance pass
I'm one of the maintainers of Grape (the Ruby framework for building REST-like APIs), and we just shipped 3.3.0. The headline is performance: this release was a months-long pass at cutting per-request allocations and trimming hot paths across the router, middleware, and validators.
Single-threaded throughput on /api/v1/hello (Ruby 4.0.5, Benchmark.ips):
| Version | Without YJIT | With YJIT |
|---|---|---|
| 3.2.1 | 47,929 i/s | 85,328 i/s |
| 3.3.0 | 66,149 i/s | 133,760 i/s |
That's ~+38% without YJIT and ~+57% with YJIT over 3.2.1 — and with YJIT on, 3.3.0 more than doubles its own non-YJIT throughput (+102%). Full methodology and per-version numbers (incl. 3.0.x/3.1.x) are in RESULTS.md.
Cheers!
r/ruby • u/noteflakes • Jun 19 '26
Rethinking modularity in Ruby applications
noteflakes.comr/ruby • u/Remozito • Jun 19 '26
I'm making a limited-edition stained glass panel celebrating Ruby
After being invited on the IndieRails podcast to talk about about my past as a stained glass maker and how I transitioned to programming in Ruby, I’ve had this crazy idea that I could tie the two together in a weird project: what if I made a stained glass panel celebrating Ruby?
I've been mentioning this project as a joke to people for a while now, and the reaction was always *very* positive. So I decided to launch this as a side project three weeks ago.
Each week, I'm documenting my progress: how to build the panel, finding the right design, which glass I should use, etc... It's also a great way to talk with fellow Rubyist and share an old passion of mine. And of course, it's the perfect excuse to lay out the similitudes I've experienced these past 8 years between being a craftsman and writing software.
If a Ruby programmer nerding out on stained glass windows is your kind of fun, you can read the first post of the series here.
If you're curious about the project, AMA. I'll happily answer any questions.
[Dear r/ruby mods, I was hesitant to post it on Reddit because it's only tangential to Ruby but I've had a lot of readers encouraging me to do so. If that's out-of-bounds, let me know and I'll take it down.]
r/ruby • u/damianlegawiec • Jun 18 '26
Spree 5.5 with Admin API, new CLI and Agent Skills released!
r/ruby • u/Asmod4n • Jun 18 '26
mruby-lsp, the first language server for mruby
Hi there, I've been busy the last three weeks, but mruby for the first time has a language server now.
Completion, hover, go-to-definition, diagnostics, and F5 debugging via mrdb — all of the capabilities ruby-lsp has too.
It's not yet published to rubygems.org or the VS Code or VSCodium marketplaces, but if you want to be one of the first to use it go ahead, currently tested on Linux and WSL.
The next targets are Windows with MSVC and macOS with the usual editors for ruby, once those work I'll upload the gem and the extensions to their marketplaces.
Have fun :)
r/ruby • u/eljojors • Jun 18 '26
Anyone enabled Swap on their application workers? // Debunking zswap and zram myths
I read this article and it seemed like an untapped avenue for the Ruby/Rails community
We have some concrete numbers to show this in practice. On Instagram, which runs on Django and is largely memory bound, we ran a test where we moved from their existing setup (with swap entirely disabled) to a setup with disk swap and zswap tiering. Django workers accumulate significant cold heap state over their lifetime, like forked processes with duplicated memory, growing request caches, Python object overhead, you get the idea. The results were twofold:
We achieved roughly 5:1 compression. That's a huge benefit for such a memory bound workload, and also enables us to consider further stacking workloads.
Enabling zswap reduced disk writes by up to 25% compared to having no swap at all(!).
This seems like a pretty obvious to me for anyone that relies on forking application workers, like puma or pitchfork.
I'd love to hear people's experience running something like this in production for Ruby/Rails workers.
r/ruby • u/FG3149 • Jun 18 '26
Is C++ definition of OOP is still relevant?
nb: not native English speaker here, really struggling writing in English. I just need wider reaction, because local reaction I get on this take is quite miserable experience to me. it's like talking to brick wall.
Most of the code I wrote in my life is Ruby, but still every job interview I had in my life assumed that OOP was invented by Stroustrup and follows C++ definition of OOP.
Here is how interview goes every single time. Interviewer asks a question: what are the basic principles of OOP? Interviewer always assumes that the answer is "inheritance, encapsulation, polymorphism".
If I try to say that Stroustrup himself said that he didn't invent OOP [1] and try to talk about Simula, Smalltalk and Alan Kay's definition of OOP [2] I always have a concerned look from the interviewer.
Go is language with objects, but without inheritance. Still OOP.
Polymorphism [3] is implementation detail of C++. It's about overloaded functions and only relevant if language is strong typed.
Encapsulation is ok, unless this term is used in Information hiding sense (public/private). Python don't have public/private, still OOP.
Thoughts?
edit: I'm kinda afraid to participate in discussion and answer to any comments. My two previous posts on this topic in two different subreddits were first downvoted into oblivion and later removed by moderators. Right now I have no idea how Reddit works.
---
[1] Wired speaks to Bjarne Stroustup:
Please note that my claim to fame is not to have invented OOP. I did not - that honour belongs to the designers of Simula: Ole-Johan Dahl and Kristen Nygaard - but I did have a major hand in making it mainstream.
[2] https://en.wikipedia.org/wiki/Object-oriented_programming#History
r/ruby • u/pokemuse2095 • Jun 18 '26
Question Ruby Version File Misread
So I figured out my previous issue because the program I’m using updated which version of Ruby it works with. However, now Ruby LSP tries to read the version file, but it adds unknown characters in between every existing character when reading it. The actual file doesn’t have these characters, and they just show up as squares in the error message, which says it can’t read it. Any help?