Skip to content

Instantly share code, notes, and snippets.

@pablete
Created April 11, 2013 21:47
Show Gist options
  • Save pablete/5367479 to your computer and use it in GitHub Desktop.
Save pablete/5367479 to your computer and use it in GitHub Desktop.
# Bootstrap script
apt-get -y update
apt-get -y install build-essential git-core libsqlite3-dev wget ssl-cert curl
#
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
#
# Add rbenv to the path:
echo '# rbenv setup' > /etc/profile.d/rbenv.sh
echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh
echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
chmod +x /etc/profile.d/rbenv.sh
source /etc/profile.d/rbenv.sh
#
# Install ruby-build:
git clone git://github.com/sstephenson/ruby-build.git /tmp/ruby-build
/tmp/ruby-build/install.sh
rbenv install 2.0.0-p0
rbenv global 2.0.0-p0
rbenv rehash
#
#Install some gems
gem update --system 1.8.25
gem install bundler ruby-shadow --no-ri --no-rdoc
gem install chef --no-ri --no-rdoc
rbenv rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment