Skip to content

Instantly share code, notes, and snippets.

@jeevandongre
Created September 25, 2015 10:37
Show Gist options
  • Save jeevandongre/0dec908e37c0753bbd58 to your computer and use it in GitHub Desktop.
Save jeevandongre/0dec908e37c0753bbd58 to your computer and use it in GitHub Desktop.
Script to install ruby 2.0.0-247 from the source on vagrant box with bundler gem. To be used with packer
#! /bin/bash -e
apt-get -y install build-essential zlib1g-dev libreadline-dev libssl-dev g++ bundler curl git htop nginx mysql-client libcurl3 libcurl3-gnutls libcurl4-openssl-dev liblzma-dev zlib1g-dev libmysqlclient-dev
sudo -u vagrant wget 'http://s3-ap-southeast-1.amazonaws.com/st-back-up/ruby-2.0.0-p247.tar.gz'
echo "Downloading ruby from s3..... \n Please wait ......"
sudo -u vagrant /bin/tar -zxvf ruby-2.0.0-p247.tar.gz
sudo chown vagrant:vagrant -R ruby-2.0.0-p247/
cd ruby-2.0.0-p247
sudo -u vagrant ./configure
sudo -u vagrant make
sudo -u vagrant make test
sudo make install
ruby -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment