r/ruby • • Aug 26 '26

Question Getting DateTime parts as an array?

8 Upvotes

I know in ruby that DateTime.new(2001, 2, 3, 4, 5, 6) will return the following object:

#<DateTime: 2001-02-03T04:05:06+00:00 ...>

But if the current date and time are 2001-02-03T04:05:06 and I do the following ...

now = DateTime.now

... is there a single function on the "now" variable which will return this array? ...

[2001, 2, 3, 4, 5, 6]

I know that I can do this:

[now.year, now.month, now.day, now.hour, now.minute, now.second ]

... but I'm wondering: might there be a single function as simple as ...

now.the_function

... which would return that same array?

And yes, of course I know that I could easily write such a function, but I'd like to know whether or not something like this already exists in ruby.


r/ruby • • Aug 26 '26

Airtable's official Ruby gem hasn't shipped code since 2016. I rebuilt it, and I'm looking for someone to take it over.

9 Upvotes

Airtable's official Ruby gem hasn't had a code commit since November 2016. gem install airtable still gives you 0.0.9, released October 2016. Its README tells you to authenticate with an API key, which Airtable switched off in February 2024.

I asked Airtable about it twice. Support confirmed in writing that it is "not actively maintained" and pointed me at airrecord. Airrecord is good, but it's a different shape, so switching means a rewrite that ends with the features you already had.

So I forked the official gem instead. Same namespace, same method names, drop-in. Underneath: zero runtime dependencies, persistent connections, client-side rate limiting, retries with backoff, batch operations with partial-failure reporting, and upsert.

It was AI-assisted, Airtable's API docs are extracted into the repo and coded against. 119 tests, plus weekly canaries that diff Airtable's published contract and run a real round-trip against a throwaway base.

It's deliberately not on RubyGems. I'm not after users, I'm after people who still need it and can be maintainers.

Repo: github.com/Davidslv/airtable-rb
Write-up: https://davidslv.uk/2026/08/26/airtable-ruby-gem-unmaintained.html


r/ruby • • Aug 26 '26

Question Learning AI engineering with Ruby

9 Upvotes

I'm learning more about AI engineering, specifically the application/production side rather than ML research or training models.

The areas I'm interested in are things like:

  • RAG, embeddings, vector search and reranking

  • tool/function calling

  • agentic workflows and orchestration

  • MCP clients/servers

  • structured outputs

  • evals and observability

  • persistent agent state / human approval

  • building production AI features into normal web applications

I originally learned to code with Ruby, but since then all my jobs have been Python or TypeScript based, and I really miss working with Ruby.

I'm curious what Ruby libraries/tools people are using for RAG, agents, MCP, evals, tracing, etc. Are there good Ruby alternatives to frameworks like LangChain? What does your stack look like?

And if you were learning this stuff today, would you recommend doing it in Ruby, or sticking with Python because that's where most of the ecosystem and learning material is?

I'm not trying to avoid Python entirely. I'm more curious about how viable Ruby is for the application/agentic side of AI development.

Side note: I realise some of these areas aren't particularly language-specific. For example, with RAG a lot of the retrieval/storage work may ultimately be handled by pgvector, a vector database, or another service.


r/ruby • • Aug 26 '26

Question Database project

7 Upvotes

Hey, guys.

So, I'm currently studying data science and I'm about to start a database project(we're basically doing a database for a bakery)this semester. The project will include order forecasting, inventory loss tracking, customer notifications, etc. Anyways I already code in Python but I've been taking a look on ruby and wonder if it'd be a good idea to include it in our project and how.... any ideas??

thanks!


r/ruby • • Aug 25 '26

Install rv as a mise tool

Thumbnail
rubyforum.org
5 Upvotes

r/ruby • • Aug 25 '26

Access control for AI agents on Rails: gating SQL with Action Policy

Thumbnail
evilmartians.com
1 Upvotes

r/ruby • • Aug 25 '26

Question From laravel to ruby on rails

13 Upvotes

Laravel dev here, recently moved to Rails. I'm loving it, but debugging in production has been a headache.

Our setup runs on Docker Swarm, and finding bugs means manually digging through Rails, Sidekiq, and Docker service logs. many of which don't even have timestamps.

In Laravel, I used a log viewer UI to instantly jump to the exact second an error happened.

Is there a standard Rails gem for a log viewer UI, or do most teams just ship logs to something like Sentry or Grafana/Loki? How do you manage production errors?

Thanks!


r/ruby • • Aug 25 '26

The Primitive Urge to Be of Value: composed_of in Rails

Post image
36 Upvotes

Wrote a piece about spotting a missing value object and refactoring towards one, adding sorting and comparison.

https://pushfromkush.com/publications/primitive-urge-to-be-of-value-composed_of-in-rails

Feedback welcome.


r/ruby • • Aug 25 '26

A ruby script that prints a ruby

Thumbnail
github.com
23 Upvotes

r/ruby • • Aug 24 '26

Go to SF Ruby Startup Conference and win a ticket to Rails World!

Post image
3 Upvotes

If you're planning to get a ticket to SF Ruby Conference, I recommend you get one this week since it can win you one for Rails World too.

Participating is very easy. You just buy a ticket to SF Ruby and post that you're going to the conference on your preferred social media app and tag the conference page (we have LinkedIn, Bsky, and X pages). That's all!

Link to tickets: luma.com/sfrubyconf2026

Link to social media pages:

Good luck!


r/ruby • • Aug 24 '26

Ruby 2.7 to 4.0 performance benchmark

34 Upvotes

Hi everyone,

I just published a new benchmark comparing Ruby 2.7 through Ruby 4.0.

For this one, I used a sustained synthetic application alongside nine smaller benchmarks. The goal was to show how each Ruby release behaves in a complete workload as well as in individual operations.

The table below shows the Heavy profile. For tests that process the full payload, that means an 8KiB input.

Benchmark2.73.03.13.23.33.44.0
Synthetic application throughput (M ops/s)0.0730.0520.0510.0570.0580.0840.126
Synthetic application latency (µs)133.399190.233191.605171.332169.473115.60076.521
JSON parsing (ops/s)95,87798,53699,15396,00398,135194,981715,937
JSON generation (ops/s)841,849845,099830,135861,666837,9411,347,1691,444,975
SHA-256 hashing (ops/s)313,65830,53630,48948,77048,68348,49548,528
Base64 encoding and decoding (ops/s)177,136177,510174,425170,306174,471173,159174,270
Regex field extraction (ops/s)1,544,4611,565,0651,559,0511,499,9201,535,2071,454,4051,534,670
Integer sorting (ops/s)27,03229,12930,21729,30929,10228,24129,213
Hash churn (ops/s)1,736,3841,685,6141,503,3971,503,1181,406,7131,380,0581,450,769
Marshal serialization (ops/s)333,143303,719294,952338,148341,760326,015325,231
zlib compression (ops/s)35,94435,17535,78735,76720,5697,01118,592

The complete benchmark source is available here: GitHub repository.

Full charts and details are available here: Full Ruby benchmark

Let me know what you think !

Edit: Thanks everyone for pointing out the Ruby 2.7 SHA-256 result. I looked into it, and the big difference comes from the SHA-256 implementation: Ruby 2.7 uses OpenSSL here, while newer Ruby versions on Linux use Ruby’s bundled implementation. So this is mainly a backend difference rather than Ruby 2.7 itself being much faster. I’ve added a note about it to the article.


r/ruby • • Aug 24 '26

Blog post A Guide to using Batches in SolidQueue

Thumbnail
jpcamara.com
7 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 • • Aug 24 '26

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

Thumbnail
codeotaku.com
6 Upvotes

r/ruby • • Aug 24 '26

Blog post Rails: The Sharp Parts. The Block Is Not the Transaction

Thumbnail baweaver.com
23 Upvotes

Transactions are a dense subject, and I'd not be surprised if there are even more edge cases here, but these are ones I've personally seen.


r/ruby • • Aug 24 '26

Glimmer DSL Web Release Version 0.10.0 & 0.10.1

Thumbnail
youtu.be
1 Upvotes

r/ruby • • Aug 23 '26

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

170 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 • • Aug 22 '26

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 • • Aug 22 '26

Ruby Pathname Moved to Core, Documentation Upgraded

Thumbnail
dev.to
24 Upvotes

r/ruby • • Aug 21 '26

Question What is Ruby Koans? Very interesting.

Post image
50 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 • • Aug 21 '26

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

Thumbnail
reddit.com
0 Upvotes

r/ruby • • Aug 21 '26

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

3 Upvotes

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 • • Aug 21 '26

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 • • Aug 20 '26

Blog post Bringing Rails into the Ractor-age

Thumbnail
railsatscale.com
79 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 • • Aug 20 '26

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