Apt support of Ruby as a key blocker

I was thinking about the new Rails foundation and things that would move the community forward. Tonight I have been fighting something that I realized was a huge issue early on, and I had forgotten until now: the poor support for Ruby in Apt.

Things like Docked start from the ruby docker image, but for many purposes that is not sufficient. Ex. if you want to use a heavyweight library like Arrow, installing that takes 10 minutes and crushes build pipelines. Apt only has ruby 2.7 and not RVM or RVENV.

It feels like it would be a substantial step forward to get Ruby easily installed on common OS package managers like Apt.

Have others had this experience?


Having taught Rails quite a bit, I think this could lower barriers in bringing folks with only a passing interest in Rails right into setting up their first app. Would significantly simplify things for students. (Although Postgres as well takes a little bit of fiddling around to get up and cruising, and generally I encourage students to use that database engine rather than Sqlite.)

I am just doing Rails gigs now, but back in the classroom we had encouraged people to get a MacBook simply because Homebrew made all that configuration somewhat less obnoxious.

Thinking about all of this, I’m grateful for only one recent thing out of Redmond – that their WSL Ubuntu shell is able to work pretty well with Rails. From there having further apt support for RVM could open doors for many on Windows machines.

Despite everything, actually Ruby and Rails works relatively well for general development if you install RubyInstaller 2 (and/ or JRuby). Of course, for numerous reasons, you would not deploy on Windows but compatibility is quite good!

Cheers, Mohit.

Lorin - I do want to second this. Closely related is that docker deployments are a pain because of the lack of Apt packages. Yes - you can start from a dedicated Ruby image if all your are doing is a trivial app, but often times the images that companies want to base off of are locked, and having apt-support would make it a lot easier.

Most other ecosystems provide a way to do this by editing the apt database locally, e.g. for node you do

curl -sL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -y nodejs

To make this safe to do for Ruby would require the Ruby team—or some other trusted source—to facilitate this. With the influx of money to the Rails Foundation, that could be reasonable to expect (or Ruby Central)

I don’t know anything about Arrow, so I’m not connecting how using Apt to install a more recent Ruby helps that - can you say more about that?

Arrow is a giant install, but there are a number of docker images with it baked in. Thus if you can start from an image like that and apt install ruby, it makes it much easier to manage for deployment purposes. Instead, we have had to do complex docker builds that start with Arrow and then do many incantations to get Ruby on there.

I.e. if you need Ruby and don’t care about the rest of the OS, then it is easy to get a docker images. If you need to start from another image, lack of apt support is painful.

1 Like

Ah, I see. Yeah, I would guess this general pattern exists a lot. You can install Ruby from source which is…slow and inconvenient. I don’t know much about apt but I wonder if the curl/bash/apt-get-install could work with minimal community support? I have no idea how that stuff works - the node script is almost 400 lines of bash

1 Like