Skip to content

Instantly share code, notes, and snippets.

@dillera
Forked from ysaotome/CentOS6_rbenv_setup.sh
Last active December 29, 2015 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dillera/7647403 to your computer and use it in GitHub Desktop.
Save dillera/7647403 to your computer and use it in GitHub Desktop.
PROFILE=~/.bash_profile
sudo yum --enablerepo=rpmforge,epel,remi -y install gcc make zlib zlib-devel openssl-devel zsh
cd ~
test -d ~/.rbenv || git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
grep 'rbenv/bin' $PROFILE &>/dev/null || echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> $PROFILE
grep 'rbenv init' $PROFILE &>/dev/null || echo 'eval "$(rbenv init -)"' >> $PROFILE
grep 'unset RUBYLIB' $PROFILE &>/dev/null || echo 'unset RUBYLIB' >> $PROFILE
test -d ~/ruby-build || git clone https://github.com/sstephenson/ruby-build.git ~/ruby-build
cd ~/ruby-build && sudo ./install.sh
source $PROFILE
rehash
rbenv install 1.9.3-p392
rbenv global 1.9.3-p392
rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment