Installing Ruby 1.9.3 on Debian using RVM


First of all, check if there's a Ruby package installed on your Debian and remove it, as it may conflict later on:
apt-get remove ruby ruby1.8 

Now some prerequesites for Debian:
apt-get -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion locales-all python libxml2=2.7.8.dfsg-2+squeeze6
For Debian Wheezy you just omit the "=2.7.8.dfsg-2+squeeze6" at the end!

Next we're installing RVM:
curl -L https://get.rvm.io | bash -s stable

Once the installation has finished, just do:
source /etc/profile.d/rvm.sh

Now you should logout and login again for your shell environment to be up2date.
RVM is by default installed in /usr/local/rvm/

Having RVM installed you can now list available Ruby versions using:
rvm list known

Then install Ruby 1.9.3  using:
rvm install ruby-1.9.3

If you install several versions you can switch between them with the following command:
rvm use 1.9.3