Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rahul286
Last active July 21, 2017 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahul286/83a85ebd2efc058f4ac883d7f87cb508 to your computer and use it in GitHub Desktop.
Save rahul286/83a85ebd2efc058f4ac883d7f87cb508 to your computer and use it in GitHub Desktop.
rbenv on mac/ubuntu homebrew method gem bundler path fix
brew install rbenv ruby-build rbenv-bundler

Run

rbenv --init

Load rbenv automatically by appending the following to ~/.zshrc:

echo 'eval "$(rbenv init -)"' > ~/.zshrc

Run following for bash and zsh

git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
~/.rbenv/bin/rbenv init

ruby-build plugin

git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

Install specific version

rbenv install 2.3.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment