前言
RVM is the acronym of Ruby enVironment Manager. It manages Ruby application environments and enables switching between them.(Github)
安装rvm
Linux
CentOS
下载依赖
1
| yum -y install zlib zlib-devel pcre pcre-devel gcc gcc-c++ openssl openssl-devel libevent libevent-devel perl unzip net-tools wget curl
|
安装密钥
1 2
| command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
|
安装rvm
1
| curl -L get.rvm.io | bash -s stable
|
将用户加入到rvm组
加载环境变量
1
| source /etc/profile.d/rvm.sh
|
查看可以安装的ruby版本
安装指定版本的ruby
<version>
:版本号
切换版本
完成
参考文献
digitalixy