First, you install ruby-build and chruby. ruby-build is a program that knows how to download and build different ruby versions. chruby manages $PATH
to control which ruby
gets invoked in your shell. They work completely independently.
sudo su
cd /usr/src
git clone https://github.com/sstephenson/ruby-build.git
cd ruby-build
./install.sh
cd -