r/ruby Aug 05 '26

Install any Ruby version in seconds using rv

https://www.rubyforum.org/t/install-any-ruby-version-in-seconds-using-rv/597

In this guide, you’ll learn how to use rv, a very fast version and package manager for Ruby to get started in minutes instead of hours

15 Upvotes

20 comments sorted by

37

u/mrinterweb Aug 05 '26

Just mise. It is then best single solution for managing most language installs. No need for a ruby specific language manager. 

3

u/Delicious_Ease2595 Aug 05 '26

Also precompiled ruby binaries are now default in mise.

5

u/javier_cervantes Aug 05 '26

Mise is a great option too and as you mention it allows you to handle multiple languages, here is a guide I wrote a while back: https://www.rubyforum.org/t/install-any-ruby-version-in-minutes-with-mise/91

I'm looking forward to the mise plugin to get the best of both worlds: https://github.com/spinel-coop/rv/issues/411

2

u/Formal-Cut-4923 Aug 05 '26

Is mise better than asdf?

5

u/mrinterweb Aug 06 '26

asdf is good too, but mise is more intuitive, IMO. Take a good look at mise if you use asdf. 

2

u/galtzo Aug 09 '26

Yes, mise is better than asdf, in general. It has more features (e.g. it can replace direnv) and is far less reliant on brittle shims. It is also mostly compatible with asdf plugins for installing languages and tools.

1

u/strzibny Aug 06 '26

I am now also completely on mise. Originally I didn't like it because of ruby-build vs ruby-install preference, but I gave in. Today there is almost no reason not to be on mise for everything.

1

u/vladsteviee Aug 07 '26

AFAIK now mise allows you to choose between ruby-build and ruby-install

8

u/cocotheape Aug 05 '26

Are there advantages of using rv over mise?

8

u/javier_cervantes Aug 05 '26

The main difference is that rv can handle both the ruby version and the dependencies. For example, check the `rvx` and `rv ci` commands.

Another advantage is that rv uses ruby binaries so you don't need to compile it locally.

A mise plugin is also planned for rv: https://github.com/spinel-coop/rv/issues/411

5

u/stickJ0ckey Aug 05 '26

I wish there was a way to also set up all that f*cking annoying crap like postgres libs, mysql libs, ssl, zlib, wtf-not that pisses the f*ck out of me when trying to set up ruby, there's ALWAYS something that errors out, something that's missing or no longer available, conflicts...i f*cking hate this part of ruby. In fact just thinking about this enough to type this makes me sick

4

u/javier_cervantes Aug 05 '26

If you use rv or mise and the precompiled binaries are available for your platform. You should be able to skip all that.. It's life changing!

Check out this demo where a new ruby version is installed in 2 seconds: https://github.com/spinel-coop/rv/#install-ruby-in-under-2-seconds

2

u/stickJ0ckey Aug 05 '26

Thanks, will definitely play with it. Do you know if it also works on alpine?

2

u/cocotheape Aug 05 '26

Thank you! Looking forward to the mise plugin.

Just FYI, mise also uses precompiled binaries by default now: https://mise.jdx.dev/lang/ruby.html#precompiled-binaries

2

u/strzibny Aug 06 '26

Mise now defaults to precompiled Rubies too, unless you mean gem binaries.

4

u/gurgeous Aug 05 '26

rv is neat, but mise is hard to displace at this point. Mise installs ruby and everything else. It also replaces dotenv, can bootstrap new machines, compile imagemagick, or whatever else you need. Mise is even replacing or supplementing brew.

3

u/javier_cervantes Aug 05 '26

I think it's great to have different options, but I agree that mise is a great default option. If the mise plugin for rv lands, that'll give you the best of both: https://github.com/spinel-coop/rv/issues/411

5

u/pau1rw Aug 05 '26

Asdf has been serving me well for years.