ttp://blog.csdn.net/lixwjava/article/details/50408070
安装curl
[plain] view plain copy
- sudo yum install curl
然后在在终端中输入命令
[plain] view plain copy
- curl -L get.rvm.io | bash -s stable
有可能会失败
按照提示使用使用命令
[plain] view plain copy
- curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
、
继续在终端中
[plain] view plain copy
- curl -L get.rvm.io | bash -s stable
查找配置文件
[plain] view plain copy
- find / -name rvm.sh
并使配置文件生效
[plain] view plain copy
- source /etc/profile.d/rvm.sh
下载RVM依赖
[plain] view plain copy
- rvm requirements
【注意】如果是RedHat7系统的话,最后一步可能会报错
解决办法
执行以下命令
curl ftp://195.220.108.108/linux/centos/7/os/x86_64/Packages/libyaml-devel-0.1.4-11.el7_0.x86_64.rpm --output libyaml-devel-0.1.4-11.el7_0.x86_64.rpm
rpm -Uvh libyaml-devel-0.1.4-11.el7_0.x86_64.rpm
然后重新执行 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
到这就应该搞定了,若是若是还不行继续参考How To Install Ruby on Rails on CentOS 6 with RVM