|
@@ -44,7 +44,18 @@ sudo apt-get install \
|
44
|
44
|
|
45
|
45
|
# Install rvm
|
46
|
46
|
read RUBY_VERSION < .ruby-version
|
47
|
|
-gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
|
|
47
|
+
|
|
48
|
+gpg_command="gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB"
|
|
49
|
+$($gpg_command)
|
|
50
|
+if [ $? -ne 0 ];then
|
|
51
|
+ echo "GPG command failed, This prevented RVM from installing."
|
|
52
|
+ echo "Retrying once..." && $($gpg_command)
|
|
53
|
+ if [ $? -ne 0 ];then
|
|
54
|
+ echo "GPG failed for the second time, please ensure network connectivity."
|
|
55
|
+ echo "Exiting..." && exit 1
|
|
56
|
+ fi
|
|
57
|
+fi
|
|
58
|
+
|
48
|
59
|
curl -sSL https://raw.githubusercontent.com/rvm/rvm/stable/binscripts/rvm-installer | bash -s stable --ruby=$RUBY_VERSION
|
49
|
60
|
source /home/vagrant/.rvm/scripts/rvm
|
50
|
61
|
|