Installing RVM

The install process is very easy, and is the very same for any distro, including ArchLinux. You have two choices, one system-wide, another as a user. The first is for production servers, or if your are alone on your machine. You'll need root privileges. The second is the recommended for multiple users on the same machine (like a development test box).

As an observation, installing RVM with gem is not recommended anymore. This article uses the recommended documentation with minor tweaks to make work on ArchLinux.

The ASCII arrow indicates which environment is currently enabled. In this case, it is Ruby 1.8.7. This could be confirmed by running:

$ ruby --version
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]

Switching Environment

To switch from one environment, to another simply run:

$ rvm <version/environment>

For example to switch to Ruby 1.8.7 one would run the following command:

$ rvm 1.8.7

It can be confirmed by running:

$ ruby --version
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]

RVM update

Simply use:

$ rvm update

Revert the default ruby to system ruby

$ rvm system

And check if the version complies with your system installed package:

$ ruby -v
$ pacman -Q ruby
$ which ruby

"which ruby" must be pointing to /usr/bin/ruby

Troubleshooting

You'll need to take care with rvm installations, since ArchLinux is very well updated, and some earlier ruby's patchlevels don't like it. RVM many times don't choose the latest patchlevel version to install, and you'll need to check manually on the ruby website, and force RVM to install it.

Ruby 1.8.x won't compile with RVM

This is a known issue on Arch Linux, and is caused by a problem with openssl. Arch uses openssl 1.0, lower patchlevels of 1.8.7 assumes 0.9.