/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- redis (LoadError) from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require' from ./redis-trib.rb:25:in `<main>'
curl -L get.rvm.io | bash -s stable % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 194 100 194 0 0 308 0 --:--:-- --:--:-- --:--:-- 307 100 24361 100 24361 0 0 12772 0 0:00:01 0:00:01 --:--:-- 89410 Downloading https://github.com/rvm/rvm/archive/1.29.3.tar.gz Downloading https://github.com/rvm/rvm/releases/download/1.29.3/1.29.3.tar.gz.asc gpg: 已创建目录‘/root/.gnupg’ gpg: 新的配置文件‘/root/.gnupg/gpg.conf’已建立 gpg: 警告:在‘/root/.gnupg/gpg.conf’里的选项于此次运行期间未被使用 gpg: 钥匙环‘/root/.gnupg/pubring.gpg’已建立 gpg: 于 2017年09月11日 星期一 04时59分21秒 CST 创建的签名,使用 RSA,钥匙号 BF04FF17 gpg: 无法检查签名:没有公钥 Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).
GPG signature verification failed for '/usr/local/rvm/archives/rvm-1.29.3.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.3/1.29.3.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:
NOTE: GPG version 2.1.17 have a bug which cause failures during fetching keys from remote server. Please downgrade or upgrade to newer version (if available) or use the second method described above.
Installing RVM to /usr/local/rvm/ Installation of RVM in /usr/local/rvm/ is almost complete:
* First you need to add all users that will be using rvm to 'rvm' group, and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.
* To start using RVM you need to run `source /etc/profile.d/rvm.sh` in all your open shell windows, in rare cases you need to reopen all shell windows.
设置下环境变量,在查看下rvm版本
1 2 3
[root@wwh214 redis]# source /etc/profile.d/rvm.sh [root@wwh214 redis]# rvm --version rvm 1.29.3 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
使用RVM升级Ruby版本 查看rvm库中已知的ruby版本
1 2 3 4 5 6 7 8 9 10 11 12 13
$ rvm list known # MRI Rubies [ruby-]1.8.6[-p420] [ruby-]1.8.7[-head] # security released on head [ruby-]1.9.1[-p431] [ruby-]1.9.2[-p330] [ruby-]1.9.3[-p551] [ruby-]2.0.0[-p648] [ruby-]2.1[.10] [ruby-]2.2[.7] [ruby-]2.3[.4] [ruby-]2.4[.1] ruby-head
安装2.4版本的ruby
1 2 3 4 5 6 7 8 9 10 11
$ rvm install 2.4.1 Searching for binary rubies, this might take some time. Found remote file https://rvm_io.global.ssl.fastly.net/binaries/centos/7/x86_64/ruby-2.4.1.tar.bz2 Checking requirements for centos. Installing requirements for centos. Installing required packages: libffi-devel, readline-devel, sqlite-devel, libyaml-devel............ Requirements installation successful. ruby-2.4.1 - #configure ruby-2.4.1 - #download ... ...
在查看一下
1 2 3 4 5 6 7 8 9 10 11 12
[root@wwh214 redis]# rvm list
rvm rubies
=* ruby-2.4.1 [ x86_64 ]
# => - current # =* - current && default # * - default