Skip to content

Instantly share code, notes, and snippets.

@nownabe
Created February 13, 2015 07:31
Show Gist options
  • Save nownabe/8c40102bfd1c4ad0eb34 to your computer and use it in GitHub Desktop.
Save nownabe/8c40102bfd1c4ad0eb34 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -eux
yum install -y gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel
git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv
git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build
cat <<EOF > /etc/profile.d/rbenv.sh
export RBENV_ROOT="/usr/local/rbenv"
export PATH="\${RBENV_ROOT}/bin:\${PATH}"
eval "\$(rbenv init --no-rehash -)"
EOF
source /etc/profile.d/rbenv.sh
rbenv install 2.2.0
rbenv global 2.2.0
gem install bundler --no-ri --no-rdoc
rbenv rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment