https://github.com/rbenv/rbenv
git clone <https://github.com/rbenv/rbenv.git> ~/.rbenv
git clone <https://github.com/rbenv/ruby-build.git> ~/.rbenv/plugins/ruby-build
cd ~/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
# Lists all Ruby versions found in `$RBENV_ROOT/versions/*'.
rbenv versions
# List latest stable versions for each Ruby.
rbenv install -l
# Install a Ruby version using ruby-build.
rbenv install <version>
# Uninstall a specific Ruby version.
rbenv uninstall <version>
# Show the global Ruby version.
rbenv global
# Set the global Ruby version.
rbenv global <version>
# Show the local application-specific Ruby version.
rbenv local
# Set the local application-specific Ruby version.
rbenv local <version>
# Unset the local application-specific Ruby version.
rbenv local --unset