Using rvm to run both versions of Ruby

First - install the latest version of git
 

$ sudo apt-get install git

Next run the following

$ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

Next go to the following user

$ cd .rvm/bin

 

$ ./rvm reload

 

$ sudo ./rvm package install zlib

 

$ sudo ./rvm install 1.8.7

 

$ sudo ./rvm install 1.9.2

Next create your gemsets for each install

$  ./rvm --create 1.8.7@187location

$ ./rvm --create 1.9.2@192location

Set the default to use ruby 1.9.2

$ sudo ./rvm --default use 1.9.2@192location

$ ruby -v

ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]