Alter Vagrantfile to use RVM for Ruby installation (#2346)

This commit is contained in:
Effy Elden 2017-04-23 22:21:20 +10:00 committed by Eugen
parent cc83ee60fb
commit a9a4710fe1
1 changed files with 4 additions and 15 deletions

Vagrantfile vendored
View File

@ -35,23 +35,12 @@ sudo apt-get install \
libreadline-dev \
# Install rbenv
git clone ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
git clone ~/.rbenv/plugins/ruby-build
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# Install rvm
cd /vagrant
read RUBY_VERSION < .ruby-version
echo "Compiling Ruby $RUBY_VERSION: warning, this takes a while!!!"
rbenv install $RUBY_VERSION
rbenv global $RUBY_VERSION
gpg --keyserver hkp:// --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL | bash -s stable --ruby=$RUBY_VERSION
source /home/vagrant/.rvm/scripts/rvm
# Configure database
sudo -u postgres createuser -U postgres vagrant -s