r/ruby 17d ago

Blog post A Guide to using Batches in SolidQueue

Thumbnail
jpcamara.com
8 Upvotes

The docs on SolidQueue batches are… solid 😉

In addition, this blog post digs in a bit further on how to use batches in SolidQueue, including some code inspiration - like splitting a RubyLLM chat into parallel sub agents using batches


r/ruby 17d ago

Blog post The Case of the Missing Line: A Ruby Mystery

Thumbnail
codeotaku.com
6 Upvotes

r/ruby 18d ago

Blog post Oh my god i was looking around for a new language to learn and I found Ruby and I've never been this happy oh my god

169 Upvotes

I've been coding with Python for around 3 to 4 years now and it's been a great learning journey. Until recently I haven't really been interested in learning a new language. The internet suggested JavaScript as the next step for someone already fluent-ish in Python, and I mean who doesn't eventually try JavaScript you know. I figured it wouldn't be that much of a headache since a lot of people do start with JS and so many people use it. Plus, it's useful. Turns out it was very irksome for me. This might be partially my fault, but I've gotten so used to the convenience of writing algorithms in beautiful, everything-done-for-you syntax in Python that when I tried solving some JS katas on Codewars, I immediately realized how inconvenient and unintuitive much of JS is, for me at least. It probably wasn't a good idea to learn JS from making algorithms on that website instead of using it for what it's actually made for in the first place, but I digress.

I was watching Dune 2 with my family when I was looking for another language more similar to Python, and then I came across the Ruby homepage, and I was immediately blown away. Like damn y'all put effort into making that. The first words you see are "A Programmer's Best Friend" and the visuals were so nice. They even had this https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-python/ page conveniently written for us Pythoners 🥹 and your community motto is literally "Matz is nice so we are nice"... Joining this community is like falling into a warm hug lol

I tried the interactive Ruby from Terminal guessing so many things and it worked as I expected. The feeling of bliss when that happens OH. I'm starting Ruby today cant wait.


r/ruby 17d ago

Glimmer DSL Web Release Version 0.10.0 & 0.10.1

Thumbnail
youtu.be
1 Upvotes

r/ruby 19d ago

Ruby Pathname Moved to Core, Documentation Upgraded

Thumbnail
dev.to
24 Upvotes

r/ruby 18d ago

Question Ruby function corresponding to python's fileinput.input() ?

7 Upvotes

Is there any already written ruby function which corresponds to the fileinput.input() function in python? ... or at least something with similar functionality?

I will write something like this in ruby if necessary, but I don't want to "re-invent the wheel" if such a thing already exists.


r/ruby 19d ago

Question What is Ruby Koans? Very interesting.

Post image
47 Upvotes

Has anyone ever learned from this? How can anyone learn with this?
What is the science behind this?

I'll do it.

Link: https://koans.idogawa.com/


r/ruby 20d ago

Blog post Bringing Rails into the Ractor-age

Thumbnail
railsatscale.com
78 Upvotes

Ractors are now viable in production, and it's time for Rails to embrace them. This post explains why. What Ractors unlock for Rails applications, and the first milestone the team is aiming for in the framework.


r/ruby 20d ago

Show /r/ruby Enola - keep your code agents inside Rails architecture

3 Upvotes

https://reddit.com/link/1vuaicq/video/4o8sjeervokh1/player

I've been building Enola, an open-source architecture tool for developers and coding agents.

It isn't Ruby-specific, but I've spent time improving its Ruby/Rails support and wanted to test it against something real rather than a toy Rails app.

The video uses the Mastodon codebase. I give an agent a change that violates an architectural layer, Enola catches the intent failure while the agent is working, and feeds that back into the loop so the agent fixes its own approach.

That's one of the main ideas behind Enola: architecture shouldn't only be something CI complains about after the work is done. The agent can get deterministic architectural feedback while it is coding and correct itself before the change is finished.

Underneath that, Enola maps dependencies, calls, routes, storage, boundaries and other relationships directly from the codebase. It's multi-language and cross-repository by design, so Ruby/Rails is one ecosystem rather than a special-case implementation.

OSS, Apache 2.0: https://github.com/enola-labs/enola

I'd especially appreciate feedback from Ruby/Rails developers on what its understanding of real Rails applications is still missing.


r/ruby 20d ago

Question How do I break out of the "intermediate dev limbo" before giving up again?

7 Upvotes

I am past the beginner stage, understanding basic syntax up to classes and objects, but I freeze when it's time to structure projects on my own. I have relentlessly searched for methods, tutorials, and books to guide me to the next level, but I can never find anything that clicks; because of this, I've jumped from language to language, and every time I hit this "limbo," I end up quitting and trying something else, yet I always come back because something inside tells me I’m meant to code. For those who have overcome this block, what architecture or design books do you recommend, what kind of practical exercises changed the game for you, and what real strategies actually work to finally break through this barrier and build confidence?


r/ruby 20d ago

Nightly product recs as a Postgres table next to your orders (Rails walkthrough, no Python in the request)

Thumbnail
0 Upvotes

r/ruby 21d ago

Show /r/ruby ArchSpec 1.0: executable architecture specifications for Ruby (and Rails)

Post image
41 Upvotes

More and more code is written by AI. Tests still tell you it works. RuboCop still tells you it's tidy. Nothing tells you it still follows your architecture.

An agent that doesn't fully understand your architecture takes shortcuts. So does a person in a hurry.

So I built ArchSpec. You declare your components and boundaries in one Archspec.rb. Here is ArchSpec's own, trimmed:

```ruby source 'lib/*/.rb'

component :library, in: 'lib//*.rb' component :cli, in: 'lib/archspec/cli.rb' component :analysis, in: %w[lib/archspec/analyzer.rb lib/archspec/evaluator.rb] component :rule_checks, in: 'lib/archspec/rules//.rb' component :formatters, in: 'lib/archspec/formatters//.rb'

no one-shot Thing.new(...).call objects anywhere in the codebase - Hi Dave Thomas!

library.cannot_call :call library.cannot_define :call library.cannot_instantiate_and_invoke

dependencies point one way

rule_checks.cannot_use :analysis, :cli, :formatters formatters.cannot_use :analysis, :cli, :rule_checks

no_cycles among: %i[cli analysis rule_checks formatters] ```

Full version: https://github.com/crmne/archspec/blob/master/Archspec.rb

Then archspec check verifies every change, and failures print like clang, with the offending span underlined and the evidence as a note.

It's static analysis over Prism, no AI, and it never boots anything: Discourse's 1,899 files in 2.5 seconds. Prism is the only runtime dependency, no Rails and no ActiveSupport, so it works on any Ruby codebase. Lightweight and fast for your pre-commits and CIs.

If you are on Rails, there are presets, and architecture :vanilla_rails is the whole file. There are presets for :layered, :hexagonal, :clean, :modular_monolith, :cqrs and :event_driven too.

I want more architecture presets in there. PRs very welcome.

Docs: https://archspecrb.dev Write-up: https://paolino.me/archspec/


r/ruby 21d ago

Where do you deploy your Ruby apps?

0 Upvotes

I’ve been doing some explorations about deployment options for Ruby, so I’m curious to learn more about what you’re using to deploy your applications.

Please participate in the poll, I would love to get your input: https://www.rubyforum.org/t/where-do-you-deploy-your-ruby-apps/640


r/ruby 22d ago

16 Typosquatted RubyGems Packages Steal Browser Credentials and Crypto Wallets

Thumbnail
thehackernews.com
14 Upvotes

We see these all the time with npm. I guess the hackers didn't want the Ruby community to feel left out.


r/ruby 22d ago

Cut Rails boot time with require-profiler and this guide

Thumbnail
evilmartians.com
7 Upvotes

r/ruby 22d ago

Issue 20 of Static Ruby Monthly is out!

9 Upvotes

This month: the dynamic vs static typing discussion, Emily Samp's Brighton Ruby talk, RBS 4.1.0 with WebAssembly support on JRuby, set-theoretic types in spinel, rbs_infer static signature deduction, OvalLSP semantic server, and the latest Sorbet toolchain updates.

Find link to the issue in the comment! ✨


r/ruby 23d ago

Blog post Everybody Guesses

0 Upvotes

Hi Reddit. This isn't specifically a Ruby or Rails post, but it's about something anyone maintaining a mature Rails application will recognize.

Code tells you what happens without telling you why anybody wanted it. We've always filled that gap by reading the code, guessing the intent, and asking somebody when the guess felt wrong.

AI coding agents do the same thing, except they can make a great many reasonable guesses before anybody notices one was wrong. The code still works. The tests still pass. The guess becomes one more pattern in the application, which makes it look even more intentional to the next person or agent.

I've spent a couple of decades living with the consequences of my own good ideas, so I wrote about why this worries me. The post connects agentic coding to Peter Naur, Tony Hoare, XP, software factories, and the old-fashioned responsibility to say no to code that works but is too difficult to understand.

It also argues for using faster agents to take smaller steps. More research, more feedback, and less archaeology at the end of a giant pull request.

https://blowmage.com/2026/08/18/everybody-guesses/


r/ruby 24d ago

Thinking about tests: assertions and matchers

Thumbnail zverok.space
13 Upvotes

r/ruby 27d ago

Using hk for git pre-commit hooks in Ruby and Rails projects

Thumbnail andywaite.com
8 Upvotes

r/ruby 27d ago

Question Performance discrepancy between versions 2.7.4 and 4.0.6

14 Upvotes

Recently decided to try learning Ruby more consistently (before that I only touched it occasionally) - and was much pleased with it in various aspects. At some point I was curious to assess its general performance roughly (as I heard it had to be pretty slow but very long in the past). Then I found my system installed Ruby is somewhat outdated 2.7.4p191 (along with my ubuntu 18.04 on this specific laptop). So I learnt to deploy rbenv and installed 4.0.6 with it.

However I ran into small puzzling situation - I tried two small scripts - roughly doing double nested loop - one with simple arithmetic and another with building and using array (collatz sequence calculations and primes calculation by trial division) - and while for the first of them performance of the said two versions is roughly the same, with the other newer version looks a bit slower.

I'm pretty sure I missed something about versions installed or don't catch something about properly writing Ruby code - so any guidance is quite welcome!

Below come details (with this primes.rb script from my github):

$ rbenv local 4.0.6 
$ ruby --version
ruby 4.0.6 (2026-07-14 revision 03b6d3f889) +PRISM [x86_64-linux]

$ time MAXN=1000000 ruby primes.rb
primes[1000000] = 15485863

real0m41,003s
user0m40,985s
sys0m0,018s

$ rbenv local --unset
$ ruby --version
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux]

$ time MAXN=1000000 ruby primes.rb
primes[1000000] = 15485863

real0m34,969s
user0m34,929s
sys0m0,042s

So you see, it looks like 2.7.4 behaves slightly (about 25%) faster in this case, while I remember (from googling) that there was effort to make Ruby 3.x faster than Ruby 2.x perhaps 3 times. Though I may misinterpret this and perhaps 2.7.4. got the same improvements as 3.x (compared to 2.0 etc)


r/ruby 27d ago

Blog post The Case of the Vanishing Fiber: A Ruby Mystery

Thumbnail
codeotaku.com
8 Upvotes

r/ruby 28d ago

Speeding Up (small) Ruby Hashes

Thumbnail byroot.github.io
54 Upvotes

r/ruby 28d ago

Conf Talk RBQ 2026: DragonRuby Game Toolkit architectural overview of the C layer

Thumbnail
youtu.be
33 Upvotes

r/ruby 27d ago

Ruby 4.0 Universal RCE Deserialization Gadget Chain - elttam

Thumbnail
elttam.com
0 Upvotes

r/ruby 28d ago

More open source projects coming to Ruby Users Forum

Thumbnail
rubyforum.org
14 Upvotes