Skip to content

Commit

Permalink
Add ruby 2.0 for older projects.
Browse files Browse the repository at this point in the history
  • Loading branch information
alanpeabody committed May 20, 2014
1 parent 3871ab7 commit 2cab0de
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions scripts/ruby-2.0.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Installs RVM & Ruby 2.0 on 12.04 LTS Ubuntu
# add to Vagrantfile:
# config.vm.provision 'shell', path: 'ruby-2.0.sh', privileged: false, keep_color: true

if [[ -s "/home/vagrant/.rvm/scripts/rvm" ]] ; then
echo 'RVM installed, skipping RVM install'
else
curl -sSL https://get.rvm.io | bash -s stable
fi

source '/home/vagrant/.rvm/scripts/rvm'

if rvm list strings | grep -lq ruby-2.0.0 ; then
echo 'Ruby 2.0.0 installed. Skipping installed.'
else
rvm autolibs packages
rvm requirements
rvm mount https://rvm.io/binaries/ubuntu/12.04/x86_64/ruby-2.0.0-p353.tar.bz2
rvm use 2.0.0 --default
gem update bundler
fi

echo 'Setting Ruby 2.0 as default'

0 comments on commit 2cab0de

Please sign in to comment.