安装curl
yum install curl
安装RVM
curl -L get.rvm.io | bash -s stable
<em id="__mceDel">Downloading https://github.com/rvm/rvm/releases/download/1.29.8/1.29.8.tar.gz.asc
gpg: Signature made Wed 08 May 2019 10:14:49 PM CST using RSA key ID 39499BDB
gpg: Can't check signature: No public key
GPG signature verification failed for '/usr/local/rvm/archives/rvm-1.29.8.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.8/1.29.8.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:
gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
or if it fails:
command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -<br>
</em>
根据提示下载
command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -<br>
最后再次执行
curl -L get.rvm.io | bash -s stable
配置RVM
//查找RVM
find / -name rvm.sh
/etc/profile.d/rvm.sh
source /etc/profile.d/rvm.sh
rvm requirements
rvmsudo yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel
查看rvm库中已知的ruby版本
rvm list known
安装一个ruby版本
rvm install 2.3.3
使用一个ruby版本
rvm use 2.3.3
设置默认版本
rvm use 2.3.3 --default
卸载一个已知版本
rvm remove 2.0.0
查看ruby版本
ruby --version