• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

RedisCluster 集群 之 Ruby 安装

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

1. 切换源

$ gem sources -l
$ gem sources --remove https://rubygems.org/
$ gem sources -a https://ruby.taobao.org/

2. 测试是否成功

gem sources –l

3.开始安装 rvm 

curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm -v 查看rvm是否安装成功

4.安装成功

rvm 1.29.0 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] 

5.升级Ruby

[root@client ~]#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[.10]
[ruby-]2.3[.8]
[ruby-]2.4[.5]
[ruby-]2.5[.3]
[ruby-]2.6[.0]

6. 修改ruby源加快安装速度

echo "ruby_url=https://cache.ruby-china.com/pub/ruby" > /usr/local/rvm/user/db

7.安装 ruby -2.6.6

[root@eshop-cache01 local]# rvm install ruby-2.6
Searching for binary rubies, this might take some time.
No binary rubies available for: centos/7/x86_64/ruby-2.6.6.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for centos.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.6.6, this may take a while depending on your cpu(s)...
ruby-2.6.6 - #downloading ruby-2.6.6, this may take a while depending on your connection...
ruby-2.6.6 - #extracting ruby-2.6.6 to /usr/local/rvm/src/ruby-2.6.6.....
ruby-2.6.6 - #configuring......................................................................
ruby-2.6.6 - #post-configuration..
ruby-2.6.6 - #compiling................................................................................................
ruby-2.6.6 - #installing................................
ruby-2.6.6 - #making binaries executable..
ruby-2.6.6 - #downloading rubygems-3.0.8
** Resuming transfer from byte position 368640
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  507k  100  507k    0     0    468      0  0:18:29  0:18:28  0:00:01  1128 
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.6.6 - #extracting rubygems-3.0.8.....
ruby-2.6.6 - #removing old rubygems........
ruby-2.6.6 - #installing rubygems-3.0.8................................................................
ruby-2.6.6 - #gemset created /usr/local/rvm/gems/ruby-2.6.6@global
ruby-2.6.6 - #importing gemset /usr/local/rvm/gemsets/global.gems.................................there was an error installing gem rubygems-bundler
...............................
ruby-2.6.6 - #generating global wrappers.......
ruby-2.6.6 - #gemset created /usr/local/rvm/gems/ruby-2.6.6
ruby-2.6.6 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.6.6 - #generating default wrappers.......
ruby-2.6.6 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.6.6 - #complete 
Ruby was built without documentation, to build it run: rvm docs generate-ri

8.查看已经安装的ruby 

[root@eshop-cache01 local]#  rvm list
=* ruby-2.6.6 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

9. 切换 ruby-2.6.6

[root@eshop-cache01 local]# rvm use ruby-2.6.6
Using /usr/local/rvm/gems/ruby-2.6.6

10.设置默认ruby版本

[root@eshop-cache01 local]# rvm use ruby-2.6.6 --default                  
Using /usr/local/rvm/gems/ruby-2.6.6

  

 

            
                

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Ruby之基础介绍(二)发布时间:2022-07-13
下一篇:
Ruby on Rails 曝路径穿越与任意文件读取漏洞发布时间:2022-07-13
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap