#4 - Manage ruby installations with rbenv
I switched to rbenv over rvm and I actually find it really intuitive.
Kinda as a personal manual, here is a list of the most used commands.
Install rbenv
Use brew as the default package manager in osx.
brew install rbenv rbenv-build
Append the following code to bash or zsh profile to initialize the rbenv
command.
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
source ~/.zshrc
Usage
List
Fetch the list of available ruby versions
rbenv install -l
Install
Install the desired version
rbenv install 2.3.0
Global
Make it available globally
rbenv global 2.3.0
Local
Or make it local. Each directory can have a local default ruby version.
rbenv local 2.2.0