1. Computing

Installing Rubies

By

Finally, you've installed RVM and gotten a list of Rubies, it's time to install a Ruby version. Once everything is set up, this is really quite easy. The only command you need to know is rvm install.

The rvm install generally only takes one parameter, the name of the Ruby to install. You can get this name from the rvm list known command. Remember to be aware of any abbreviations and to use them to your advantage. Once you issue the rvm install command, wait for the Ruby to download, extract and compile. Depending on your computer, this can take quite some time. For a modern quad-core machine (compilation is easily parallelizeable), this might be a minute or so, but on slower machines it can take half an hour or more.

$ rvm install 1.9.1
Installing Ruby from source to: /home/user/.rvm/rubies/ruby-1.9.1-p378
Downloading ruby-1.9.1-p378, this may take a while depending on your connection...

...

Compiler output is suppressed. Instead, you will see green and red status messages, as well as wget downloading the archive. Green messages are good, red messages mean something went wrong. If something does go wrong, it will give you the location of a logfile that will contain useful error messages. Be sure to look there first if anything goes wrong.

That's it, your Rubies are installed. All that's left is to start using them.

©2014 About.com. All rights reserved.