From 6e376fa76d0f904721b7048d9590035bb86b3f1e Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Thu, 6 Jun 2013 18:06:46 -0300 Subject: [PATCH] Install: Improves ruby/rvm install - Directly install the right version The script used to download the latest version of ruby through rvm, then later on install the one used by the project. Now we directly download the version of the project when rvm is installed. --- scripts/create-dev-env.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/create-dev-env.sh b/scripts/create-dev-env.sh index 06d31e9993..11703fab83 100755 --- a/scripts/create-dev-env.sh +++ b/scripts/create-dev-env.sh @@ -349,6 +349,11 @@ if [ "$HOME/.rvm" != $RUBY_DIR ]; then fi fi +# Let the repo override the version of Ruby to install +if [[ -r $BASE/edx-platform/.ruby-version ]]; then + RUBY_VER=`cat $BASE/edx-platform/.ruby-version` +fi + # rvm has issues in debian family, this is taken from stack overflow case `uname -s` in Darwin) @@ -361,7 +366,7 @@ case `uname -s` in http://stackoverflow.com/questions/9056008/installed-ruby-1-9-3-with-rvm-but-command-line-doesnt-show-ruby-v/9056395#9056395" sudo apt-get --purge remove ruby-rvm sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh - curl -sL https://get.rvm.io | bash -s stable --ruby --autolibs=enable --auto-dotfiles + curl -sSL https://get.rvm.io | bash -s stable --ruby=$RUBY_VER --autolibs=enable --auto-dotfiles ;; esac @@ -386,11 +391,6 @@ case `uname -s` in ;; esac -# Let the repo override the version of Ruby to install -if [[ -r $BASE/edx-platform/.ruby-version ]]; then - RUBY_VER=`cat $BASE/edx-platform/.ruby-version` -fi - # Current stable version of RVM (1.19.0) requires the following to build Ruby: # # autoconf automake libtool pkg-config libyaml libxml2 libxslt libksba openssl