Created
July 18, 2012 17:23
-
-
Save isaksky/3137579 to your computer and use it in GitHub Desktop.
Script to install rbenv and ruby-build
This file contains 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
# Check out rbenv into ~/.rbenv. | |
cd | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
# Add ~/.rbenv/bin to your $PATH for access to the rbenv command-line utility. | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
# Add rbenv init to your shell to enable shims and autocompletion. | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
# Restart your shell so the path changes take effect. | |
exec $SHELL | |
# Install ruby-build as an rbenv plugin, giving you access to the rbenv install command. | |
mkdir -p ~/.rbenv/plugins | |
cd ~/.rbenv/plugins | |
git clone git://github.com/sstephenson/ruby-build.git | |
# You can now begin using rbenv. | |
# For example: | |
# rbenv install 1.9.3-p194 | |
# rbenv global 1.9.3-p194 #set global ruby version | |
# If you install evil gems that provide binaries, you need to this command for them to work properly: | |
# rbenv rehash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run with: