Skip to content

Instantly share code, notes, and snippets.

@lukaszsagol
Created October 3, 2013 23:46
Show Gist options
  • Save lukaszsagol/6818870 to your computer and use it in GitHub Desktop.
Save lukaszsagol/6818870 to your computer and use it in GitHub Desktop.
Installing Ruby (example for 2.0.0-p247) on OSX with rbenv (along with openssl and readline) using homebrew
brew update
# skip to line 14 if you have rbenv
# and ruby-build installed
brew install rbenv ruby-build
if [ -n "${ZSH_VERSION:-}" ]; then
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc
else
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile
fi
eval "$(rbenv init - --no-rehash)"
# when rbenv and ruby-build are installed
brew install readline openssl
brew link openssl --force
CONFIGURE_OPTS="--disable-install-doc --with-readline-dir=$(brew --prefix readline)" rbenv install 2.0.0-p247
rbenv global 2.0.0-p247
gem install --no-ri --no-rdoc bundler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment