Created
March 1, 2012 09:14
-
-
Save hnagato/1948495 to your computer and use it in GitHub Desktop.
Install ruby with homebrew, rbenv and ruby-build on OSX 10.7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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