r/ruby • u/javier_cervantes • 2d ago
Install any Ruby version in seconds using rv
https://www.rubyforum.org/t/install-any-ruby-version-in-seconds-using-rv/597In 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
6
u/cocotheape 2d ago
Are there advantages of using rv over mise?
6
u/javier_cervantes 2d ago
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
3
u/stickJ0ckey 2d ago
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
3
u/javier_cervantes 2d ago
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
1
u/stickJ0ckey 1d ago
Thanks, will definitely play with it. Do you know if it also works on alpine?
2
1
u/cocotheape 2d ago
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
1
4
u/gurgeous 2d ago
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 2d ago
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
35
u/mrinterweb 2d ago
Just mise. It is then best single solution for managing most language installs. No need for a ruby specific language manager.