rbenv is a version manager for Ruby binaries.
`brew install rbenv ruby-build`
Add rbenv to your `.zshenv` or `.bash_profile` so that it loads every time you open a terminal. For me, I run `vim ~/.zshenv`
# From brew install rbenv, shims autocompletion if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi # Ruby environment overrides system ruby export PATH="$HOME/.rbenv/bin:$PATH"
# rbenv-gem-rehash When you run `gem install $MYGEM`, if `$MYGEM` provides a binary or wrapper script, then it will make *rbenv* create a shim for it that you can see in your path.
# Installing a New Ruby
List installable Ruby Virtual Machines with `rbenv install -l`
For instance, to install RVM 2.2.3
rbenv install 2.2.3 rbenv global 2.2.3 ruby -v
# Setting up a Ruby Per Project
In the project root, create a `.ruby-version` file and shovel in the ruby version you want. For instance, for `ruby-2.2.3` `rbenv local 2.2.3`