Skip to content

Instantly share code, notes, and snippets.

@seyhunak
Forked from juno/README.md
Created March 20, 2013 13:36
Show Gist options
  • Save seyhunak/5204682 to your computer and use it in GitHub Desktop.
Save seyhunak/5204682 to your computer and use it in GitHub Desktop.

Install rbenv and ruby-build to Amazon Linux (cloud-init).

  1. Copy & paste content of user-data.sh to EC2 RunInstances user-data
  2. Then, logging in to EC2 instance as ec2-user and run install-ruby.sh.
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
# Install and enable ruby-1.9.3-p0
rbenv install 1.9.3-p0 && rbenv global 1.9.3-p0
#!/bin/sh
# Install developer tools
yum install -y git gcc make readline-devel openssl-devel
# Install ruby-build system-widely
git clone git://github.com/sstephenson/ruby-build.git /tmp/ruby-build
cd /tmp/ruby-build
./install.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment