# Install rbenv.
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
source .zshrc
# Install plugins.
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
git clone https://github.com/sstephenson/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems
echo "bundler\npry\nrbenv-rehash" > ~/.rbenv/default-gems
git clone git://github.com/ianheggie/rbenv-binstubs.git ~/.rbenv/plugins/rbenv-binstubs
mkdir ~/.bundle
echo "BUNDLE_BIN: bin" > ~/.bundle/config
$ rbenv install --list
$ rbenv install 2.2.2
$ rbenv global 2.2.2