From 0cd10dd61c7181e58949eae36e844bb0dfbdf326 Mon Sep 17 00:00:00 2001 From: beerlington Date: Tue, 30 Sep 2014 08:29:43 -0400 Subject: [PATCH] Adds script for Ruby 2.1.3 --- scripts/ruby-2.1.3.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 scripts/ruby-2.1.3.sh diff --git a/scripts/ruby-2.1.3.sh b/scripts/ruby-2.1.3.sh new file mode 100644 index 0000000..b9af627 --- /dev/null +++ b/scripts/ruby-2.1.3.sh @@ -0,0 +1,23 @@ +# Installs RVM & Ruby 2.1.3 on 12.04 LTS Ubuntu +# add to Vagrantfile: +# config.vm.provision 'shell', path: 'ruby-2.1.3.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.1.3 ; then + echo 'Ruby 2.1.3 installed. Skipping installed.' +else + rvm autolibs packages + rvm requirements + rvm mount https://rvm.io/binaries/ubuntu/12.04/x86_64/ruby-2.1.3.tar.bz2 + rvm use 2.1.3 --default + gem update bundler +fi + +echo 'Setting Ruby 2.1.3 as default'