Ruby and Rails on Ubuntu 9.10 Karmic Koala

Ruby Version Manager is a really powerful tool which provides an easy, non obtrusive way to install multiple versions of Ruby, Rails and other gems on your Ubuntu 9.10 box. You won’t have to compile anything manually (RVM does a great job) and everything will be kept in your home directory. All you need to do is:

Last step modifies your ~/.bashrc (or ~/.zshrc), so the changes will be visible in all new terminal instances. After restarting your terminal, pick a Ruby version to install:

After a couple of minutes you’ll have a fully functional Ruby 1.9.1 interpreter installed in your ~/.rvm directory. If you want to use it as a default Ruby, type:

Now you can install Rails and other stuff – remember to not use sudo to do that (since everything is kept locally in your home directory, RVM manages your PATH environment variable as well):

For more information about Ruby Version Manager, visit the RVM’s homepage.