Skip to content

Instantly share code, notes, and snippets.

@tesths
Last active November 28, 2019 08:33
Show Gist options
  • Select an option

  • Save tesths/2bc63d2d833c3c83d6ac1ff5b2f05252 to your computer and use it in GitHub Desktop.

Select an option

Save tesths/2bc63d2d833c3c83d6ac1ff5b2f05252 to your computer and use it in GitHub Desktop.
rvm
#fork from https://github.com/huacnlee/init.d
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.org/pub/ruby" > ~/.rvm/user/db
fi
rvm requirements
rvm install 2.3.3 --disable-binary
rvm use 2.3.3 --default
rvm -v
ruby -v
if [ MIRROR = '1' ]; then
gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
fi
gem install bundler
bundle -v
echo "--------------------------- Install Successed -----------------------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment