RVM, the Ruby Version Manager is a magnificent tool that lets you manage different Ruby versions and gemsets. Kinda like python’s virtualenv, but on steroids. Pair it with bundler and there is not much you can’t do if you want to work with multiple Ruby environments.
RVM uses what it calls
binary rubies which are precompiled Ruby binaries,
for select popular distributions and Ruby versions. If it fails to find one,
it will fall back to installing anything it needs from your distribution’s
packages and then compiling Ruby from source. This fallback is not optimal,
but it works. Binary rubies are faster and more convenient though.
Ubuntu and Debian both get the love of binary rubies. However, Linux Mint does not, at least not yet.
If you try to install Ruby version 2.1.2 in Mint 17 with RVM you get this:
which means that you would have to compile it.
However, Ubuntu 14.04 which is the base for Mint 17 does have a binary ruby. So why not install that instead? Lets see what we can find.
binary rubies gets us to the repository in the RVM site.
There is indeed a binary for 2.1.2 in the Ubuntu 14.04 folder.
Now, remember the comment in the console output above?
Turns out that you can install a binary ruby directly from a url. We copy the link for the ubuntu binary ruby and do
And now Ruby 2.1.2 is installed in RVM without needing to compile it.
Of course, RVM does only have the most popular versions precompiled. If you can’t find what you are looking for in their site, don’t be afraid to compile it anyway.