Install and/or update rbenv and friends by running:
bash < <(curl -s https://raw.github.com/wongyouth/rbenv-installer/master/rbenv-installer.sh)
Install Ruby 1.9.3-p0 and make it global:
rbenv install 1.9.3-p0
rbenv global 1.9.3-p0
rbenv source code is available at https://github.com/sstephenson/rbenv