Skip to content

Instantly share code, notes, and snippets.

@JesseHerrick
Created December 1, 2013 04:28
Show Gist options
  • Save JesseHerrick/7728497 to your computer and use it in GitHub Desktop.
Save JesseHerrick/7728497 to your computer and use it in GitHub Desktop.
Install RBEnv on EC2
# Become sudo
sudo su -
# Update
yum update
# Install git for RBEnv and gcc for Ruby.
yum install git gcc
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Create /etc/profile.d/rbenv.sh
touch /etc/profile.d/rbenv.sh
cat <<EOF > /etc/profile.d/rbenv.sh
export RBENV_ROOT=/usr/local/rbenv
export PATH="${RBENV_ROOT}/bin:$PATH"
eval "$(rbenv init -)"
EOF
. /etc/profile
# Download rubybuild
git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build
# Now install Ruby.
rbenv install 2.0.0-p353
rbenv global 2.0.0-p353
rbenv rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment