Alter Vagrantfile to use RVM for Ruby installation (#2346)
parent
6a4e0ff47a
commit
745cdbd6d8
|
@ -35,23 +35,12 @@ sudo apt-get install \
|
||||||
libreadline-dev \
|
libreadline-dev \
|
||||||
-y
|
-y
|
||||||
|
|
||||||
# Install rbenv
|
# Install rvm
|
||||||
git clone https://github.com/rbenv/rbenv.git ~/.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 https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
|
|
||||||
|
|
||||||
export PATH="$HOME/.rbenv/bin:$PATH"
|
|
||||||
eval "$(rbenv init -)"
|
|
||||||
|
|
||||||
cd /vagrant
|
cd /vagrant
|
||||||
|
|
||||||
read RUBY_VERSION < .ruby-version
|
read RUBY_VERSION < .ruby-version
|
||||||
echo "Compiling Ruby $RUBY_VERSION: warning, this takes a while!!!"
|
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
|
||||||
rbenv install $RUBY_VERSION
|
curl -sSL https://get.rvm.io | bash -s stable --ruby=$RUBY_VERSION
|
||||||
rbenv global $RUBY_VERSION
|
source /home/vagrant/.rvm/scripts/rvm
|
||||||
|
|
||||||
# Configure database
|
# Configure database
|
||||||
sudo -u postgres createuser -U postgres vagrant -s
|
sudo -u postgres createuser -U postgres vagrant -s
|
||||||
|
|
Loading…
Reference in New Issue