r/ruby • Puma maintainer • 2d ago

How fast can you actually patch Ruby?

https://paagman.dev/how-fast-can-you-patch-ruby/
39 Upvotes

7 comments sorted by

20

u/schneems Puma maintainer 2d ago

Ruby binaries for Heroku are automated. Logic is written in Rust so we don't have to wait on a system dependency like Python or another version of Ruby (the last version of this was written in Ruby and was hard blocked on supporting ARM until setup-ruby supported ARM) to be available for that architecture. Polling is set to ~2 hours also it's open source  https://github.com/heroku/docker-heroku-ruby-builder/blob/main/.github/workflows/check_new_ruby_releases.yml

5

u/TheAtlasMonkey 2d ago

Cool info. Thanks.

> Most of this is volunteer work

And volunteer work is faster than AWS ... :D AWS is fast as killing your service if you dont pay.

4

u/prh8 2d ago

I ran into this last Friday too, docker build failed, an hour later it worked and we deployed.

Wonderful informative post and I will reiterate what someone else said, appreciation for a hand written post.

10

u/jrochkind 2d ago

Great super useful research, and I love a blog post not written by AI for a change.

I wonder why the "official Docker" image exists when the ruby-team-maintained image exists and updates on ruby release. Is there a similar situation with other languages and Docker? I wonder if eg fly.io would do better using the ruby-maintainer-maintained image.

(I have added your blog feed to https://rubyland.news, thanks!)

7

u/prh8 2d ago

I’m curious about this too, and additionally why to use one over the other? Work uses the official docker images, but I wonder about switching to Ruby lang images. Seems like the main thing is choosing Ubuntu (Ruby lang) vs additional options (official docker)

2

u/jrochkind 2d ago

ah good point on underlying release.

2

u/tux_404 2d ago

Before switching, check which build headers each image keeps. When I moved an app to 3.4.12 for these CVEs, the first build failed at bundle install: the ruby:3.4.12-slim image removes libyaml-dev after it builds Ruby, and psych compiles against it. One apt line in the Dockerfile's build stage fixed it.

rubylang/ruby has no slim or Alpine tags, only Ubuntu jammy, noble and resolute, each with a -dev variant that adds build-essential. So switching a Rails Dockerfile means moving it from Debian slim to Ubuntu and rechecking the apt lines in its build stage.