This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.
# Not sure how much of this we need
aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev
# Install rbenv for managing enabling of multiple rubies.
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
exec $SHELL
# Install the ruby-build plugin for easy building of rubies.
mkdir -p ~/.rbenv/plugins
cd !$
git clone git://github.com/sstephenson/ruby-build.git
cd where/ever
# Install a ruby
rbenv install 1.9.3
rbenv rehash
# Enable a newly installed ruby, persistently, globally.
rbenv global 1.9.3
rbenv rehash
# Install bundler, create a Gemfile, install to project.
gem install bundler