forked from huacnlee/init.d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_rvm
More file actions
executable file
·27 lines (23 loc) · 774 Bytes
/
Copy pathinstall_rvm
File metadata and controls
executable file
·27 lines (23 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
echo "Install RVM"
echo "---------------------------------------------------------------------------"
command gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
command curl -L https://get.rvm.io | bash -s stable
if [ whoami = 'root']; then
command source /etc/profile.d/rvm.sh
else
command source ~/.rvm/scripts/rvm
fi
if [ MIRROR = '1' ]; then
echo "ruby_url=https://cache.ruby-china.com/pub/ruby" > ~/.rvm/user/db
fi
rvm requirements
rvm install 2.3.1 --disable-binary
rvm use 2.3.1 --default
rvm -v
ruby -v
if [ MIRROR = '1' ]; then
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
fi
gem install bundler
bundle -v
echo "--------------------------- Install Successed -----------------------------"