How to install Ruby 3 with ASDF

In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first:

asdf plugin-update ruby

Then you can install Ruby 3 with:

asdf install ruby 3.0.0

Or:

asdf install ruby latest

Also updated my blog post here.

Think it would be good if asdf list-all ruby simply does asdf plugin-update ruby beforehand - might save a bit of head scratching for a lot of people :laughing:

3 Likes

Corresponding tweet for this thread:

https://twitter.com/dev_talk/status/1355202054550073345

Share link for this tweet.


Related portal:

I’ve been meaning to try out asdf. What benefits do you see over, say rvm or rbenv?

1 Like

I think the biggest benefit is that you can use it for lots and lots and lots of different languages :nerd_face:

Have a look at their list here:

In my dev env setup guide on my blog (link in first post) we use ASDF for Ruby, Elixir, Erlang and NodeJS :smiley:

For Ruby in a production env, I’ve always used Chruby as it has always worked well:

2 Likes

I have my own script that does a full update of all installed software and I’ve included ASDF updating of all plugins in it for that exact reason, @AstonJ. It’s a bit manual but you can script it (like I did) and then forget about it.

@ohm One version manager for 99% of all languages and many tools and databases you’ll ever use, is my motivation. Using asdf definitely simplified my setup.

3 Likes

I’m completely sold on asdf. With the .tool-versions file I can just asdf install in a project and go.

I also love how simple it is to have multiple versions of PostgreSQL running. I use the technique described here to manage the database per project so I know I’m always exactly matching the production version. This has been super helpful when one project is on Heroku and runs 12 or 13 and another is using AWS Aurora that’s more like 9.6 maybe 10.

2 Likes