Skip to content

Instantly share code, notes, and snippets.

@hnagato
Created March 1, 2012 09:14
Show Gist options
  • Save hnagato/1948495 to your computer and use it in GitHub Desktop.
Save hnagato/1948495 to your computer and use it in GitHub Desktop.
Install ruby with homebrew, rbenv and ruby-build on OSX 10.7
# Install rbenv, ruby-build and readline
brew install rbenv ruby-build readline
brew link readline
# Add rbenv init to .zshenv
cat <<-EOF | ruby -pe 'gsub("\\", "")' >> .zshenv
# rbenv
if which rbenv >/dev/null 2>&1; then
eval "$\(rbenv init -\)"
source /usr/local/Cellar/rbenv/0.3.0/completions/rbenv.zsh
fi
EOF
# Install ruby with CONFIGURE_OPTS
CONFIGURE_OPTS="--enable-shared --with-opt-dir=/usr/local" rbenv install 1.9.3-p125
rbenv rehash
brew unlink readline
# Install bundler
rbenv exec gem udpdate --system
rbenv exec gem install bundler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment