Installing Ruby via RVM on Ubuntu Lucid 10.04
Clone this wiki locally
This will be a system-wide install using RVM.
Install system ruby
$ sudo apt-get install ruby
$ sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
Install a bunch of packages needed to get ruby 1.9.2+ to play nicely on Lucid under RVM
$ sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev autoconf libxslt-dev
Users that need access to RVM rubies will need to be added to the
$ sudo usermod -a -G rvm USERNAME
NOTE: If you're adjusting the groups of the currently logged in user, you'll need to log out and log back in before changes go into effect.
Verify that RVM installed correctly.
$ which rvm /usr/local/rvm/bin/rvm
which rvm does not return a response, try logging out of your server and logging back in.
According to the RVM documentation,
it's extremely important that you do not use
sudo for anything related
to rvm with the exception of the initial install and upgrading RVM itself.
Rvm comes with a
sudo wrapper that preserves certain environment variables
that rvm needs to run properly. This wrapper is called
rvmsudo, and you
use it just like you would sudo.
Link zlib with rvm
$ rvm --verify-downloads 1 pkg install zlib
Download and install new ruby via rvm. WARNING This will take an ungodly amount of time.
$ rvmsudo rvm install 1.9.3
Make 1.9.3 the default ruby
$ rvm use 1.9.3 --default
Verify the correct version of ruby is being used
$ ruby --version ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]