Skip to content

Commit 97c31e7

Browse files
committed
Fix Ruby + RVM provisioning
1 parent 7c417cc commit 97c31e7

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

scripts/provisioning/ruby.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@
22

33
SSH_USER=${SSH_USERNAME:-vagrant}
44

5-
export HOME=/home/${SSH_USER}
6-
7-
RVM_PATH=${HOME}/.rvm
8-
5+
su ${SSH_USER} <<EOF
96
echo "==> Trusting Michal Papis"
107
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
118
129
echo "==> Installing RVM"
1310
curl -sSL https://get.rvm.io | bash -s stable
11+
source ~/.rvm/scripts/rvm
1412
1513
echo "==> Installing Ruby 2.1"
16-
source ${RVM_PATH}/scripts/rvm
17-
rvm use --install 2.1
14+
rvm use --install --default 2.1
15+
EOF
1816

19-
chown -R ${SSH_USER}:${SSH_USER} ${RVM_PATH}
20-
export HOME=/home/root
17+
chown -R ${SSH_USER}:${SSH_USER} /home/${SSH_USER}

0 commit comments

Comments
 (0)