Created
December 26, 2013 19:52
-
-
Save JesseHerrick/8137946 to your computer and use it in GitHub Desktop.
Install RBEnv on OSX/Linux
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
# Download RBEnv | |
git clone git://github.com/sstephenson/rbenv.git $HOME/.rbenv | |
# Find out which shell init file exists. | |
if [ -f $HOME/.zshrc ] | |
then | |
SHELL_INIT="$HOME/.zshrc" | |
elif [ -f $HOME/.bashrc ] | |
then | |
SHELL_INIT="~/.bashrc" | |
elif [ -f $HOME/.bash_profile ] | |
then | |
SHELL_INIT="$HOME/.bash_profile" | |
else | |
echo "No shell init!" | |
fi | |
cat << EOF >> $SHELL_INIT | |
export RBENV_ROOT=$HOME/.rbenv | |
export PATH="${RBENV_ROOT}/bin:$PATH" | |
eval "$(rbenv init -)" | |
EOF | |
# Download rubybuild | |
git clone https://github.com/sstephenson/ruby-build.git $HOME/.rbenv/plugins/ruby-build | |
# Never run `rbenv rehash` again! | |
git clone https://github.com/sstephenson/rbenv-gem-rehash.git $HOME/.rbenv/plugins/rbenv-gem-rehash | |
echo "RBEnv installed!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment