创建redis集群时出现no such fileto load -- rubygems问题的解决_2台redis集群no such file to load -- rubygems-程序员宅基地

技术标签: redis  

在创建redis集群时出现下列错误

[root@redis src]# ./redis-trib.rb create--replicas 1 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003127.0.0.1:7004 127.0.0.1:7005

./redis-trib.rb:24:in `require': no such fileto load -- rubygems (LoadError)

from./redis-trib.rb:24

解决方法

1.安装ruby软件包

[root@redis ~]#yum -y install ruby

2.安装rubygems软件包

[root@redis~]#tar -zxvf rubygems-2.2.2.tar

[root@redis ~]# cd rubygems-2.2.2
[root@redis rubygems-2.2.2]# ls
bin                  History.txt   MIT.txt      test
CVE-2013-4287.txt    lib           Rakefile     UPGRADING.rdoc
CVE-2013-4363.txt    LICENSE.txt   README.rdoc  util
hide_lib_for_update  Manifest.txt  setup.rb
[root@redis rubygems-2.2.2]# ruby setup.rb
RubyGems 2.2.2 installed
Installing ri documentation for rubygems-2.2.2

/usr/lib/ruby/1.8/rdoc/rdoc.rb:280: warning: conflicting chdir during another chdir block
/usr/lib/ruby/1.8/rdoc/rdoc.rb:287: warning: conflicting chdir during another chdir block

=== 2.2.1 / 2014-01-06

Bug fixes:

* Platforms in the Gemfile.lock GEM section are now handled correctly.  Bug
  #767 by Diego Viola.
* RubyGems now displays which gem couldn't be uninstalled from the home
  directory.  Pull request #757 by Michal Papis.
* Removed unused method Gem::Resolver#find_conflict_state.  Pull request #759
  by Smit Shah.
* Fixed installing gems from local files without dependencies.  Issue #760 by
  Arash Mousavi, pull request #764 by Tim Moore.
* Removed TODO about syntax that works in Ruby 1.8.7.  Pull request #765 by
  Benjamin Fleischer.
* Switched Gem.ruby_api_version to use RbConfig::CONFIG['ruby_version'] which
  has the same value but is overridable by packagers through
  --with-ruby-version= when configuring ruby.  Bug #770 by Jeremy Evans.
* RubyGems now prefers the bundler API for `gem install` to reduce HTTP
  requests.  (This change was intended for RubyGems 2.2.0 but was missed.)
  This should address bug #762 by Dan Peterson and bug #766 by mipearson.
* Added Gem::BasicSpecification#source_paths so documentation or analysis
  tools can work properly as require_paths no longer returns extension source
  directories.  Bug #758 Vít Ondruch.
* Gem.read_binary can read read-only files again.  This caused file://
  repositories to stop working.  Bug #761 by John Anderson.
* Fixed specification file sorting for Ruby 1.8.7 compatibility.  Pull
  request #763 by James Mead

=== 2.2.0 / 2013-12-26

Special thanks to Vít Ondruch and Michal Papis for testing and finding bugs in
RubyGems as it was prepared for the 2.2.0 release.

Major enhancements:

* RubyGems can check for gem dependencies files (gem.deps.rb or Gemfile) when
  rubygems executables are started and uses the found dependencies.  This
  means `rake` will work similar to `bundle exec rake`.  To enable this set
  the `RUBYGEMS_GEMDEPS` environment variable to the location of your
  dependencies file.

  See Gem::use_gemdeps for further details.

* A RubyGems directory may now be shared amongst multiple ruby versions.  Upon
  activation RubyGems will automatically compile missing extensions for the
  current platform when the built objects are missing.  Issue #596 by Michal
  Papis

  By default different platforms do not share gem install locations so this
  must be configured by setting GEM_HOME to a common directory.  Some gems use
  fixed paths for requiring extensions and are not compatible with sharing gem
  directories.

  The default sharing location may be configured by RubyGems packagers through
  Gem.default_ext_dir_for.  Pull Request #744 by Vít Ondruch.

Minor enhancements:

* RubyGems checks the 'allowed_push_host' metadata value when pushing a gem to
  prevent an accidental push to a public repository (such as rubygems.org).
  If you have private gems you should set this value in your gem specification
  metadata.  Pull request #603 by Seamus Abshere.
* `gem list` now shows results for multiple arguments.  Pull request #604 by
  Zach Rabinovich.
* `gem pristine --extensions` will restore only gems with extensions.  Issue
  #619 by Postmodern.
* Gem::Specification#files is now sorted.  Pull request #612 by Justin George.
* For `gem list` and friends, "LOCAL" and "REMOTE" headers are omitted if
  only local or remote gem information is requested with --quiet.  Pull
  request #615 by Michal Papis.
* Added Gem::Specification#full_require_paths which is like require_paths, but
  returns a fully-qualified results.  Pull request #632 by Vít Ondruch.
* RubyGems now looks for the https_proxy environment variable for https://
  sources.  RubyGems will fall back to http_proxy if there is no https_proxy.
  Issue #610 by mkristian.
* RubyGems now creates directories in .gem files.  Issue #631 by marksolaris.
* RubyGems raises an exception when a specification includes its gem.  Issue
  #623 by notEthan.
* RubyGems now displays relevant release note information when updating
  RubyGems.  Issue #647 by Trevor Wennblom.
* Deprecated Gem::Installer::ExtensionBuildError in favor of
  Gem::Ext::BuildError.  The old constant is an alias for the new constant.
* When extensions are built the gem_make.out file is always written now, even
  on success.  This will help with debugging bad builds that report success.
* If a specification fails to validate RubyGems shows a link to the
  specification reference guide.  Issue #656 by Markus Heiler.
* When using `gem install -g`, RubyGems now detects the presence of an
  Isolate, Gemfile or gem.deps.rb file.
* Added Gem::StubSpecification#stubbed? to help determine if a user should run
  `gem pristine` to speed up gem loading.  Pull request #694 and #701 by Jon
  Leighton.
* RubyGems now warns when a gem has a pessimistic version dependency that may
  be too strict.
* RubyGems now warns when a gem has an open-ended dependency.
* RubyGems now raises an exception when a dependency for a gem is defined
  twice.
* Marked the license specification attribute as recommended.  Pull request
  #713 by Benjamin Fleischer.
* RubyGems uses io/console instead of `stty` when available.  Pull request
  #740 by Nobuyoshi Nakada
* Relaxed Gem.ruby tests for platforms that override where ruby lives.  Pull
  Request #755 by strzibny.

Bug fixes:

* RubyGems now returns an error status when any file given to `gem which`
  cannot be found.  Ruby bug #9004 by Eugene Vilensky.
* Fixed command escaping when building rake extensions.  Pull request #721 by
  Dmitry Ratnikov.
* Fixed uninstallation of gems when GEM_HOME is a relative directory.  Issue
  #708 by Ryan Davis.
* Default gems are now ignored by Gem::Validator#alien.  Issue #717 by David
  Bahar.
* Fixed typos in RubyGems.  Pull requests #723, #725, #731 by Akira Matsuda,
  pull request #736 by Leo Gallucci, pull request #746 by DV Suresh.
* RubyGems now holds exclusive locks on cached gem files to prevent incorrect
  updates.  Pull Request #737 by Smit Shah
* Improved speed of `gem install --ignore-dependencies`.  Patch by Terence
  Lee.


------------------------------------------------------------------------------

RubyGems installed the following executables:
 /usr/bin/gem

Ruby Interactive (ri) documentation was installed. ri is kind of like man 
pages for ruby libraries. You may access it like this:
  ri Classname
  ri Classname.class_method
  ri Classname#instance_method
If you do not wish to install this documentation in the future, use the
--no-document flag, or set it as the default in your ~/.gemrc file. See
'gem help env' for details.

3.安装redis库

[root@redis rubygems-2.2.2]# gem install redis
Fetching: redis-3.0.7.gem (100%)
Successfully installed redis-3.0.7
Installing ri documentation for redis-3.0.7
/usr/lib/ruby/1.8/rdoc/rdoc.rb:280: warning: conflicting chdir during another chdir block
/usr/lib/ruby/1.8/rdoc/rdoc.rb:287: warning: conflicting chdir during another chdir block
Done installing documentation for redis after 3 seconds
1 gem installed

4.再次执行创建集群命令

[root@redis src]# ./redis-trib.rb create --replicas 1 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005
>>> Creating cluster
Connecting to node 127.0.0.1:7000: OK
Connecting to node 127.0.0.1:7001: OK
Connecting to node 127.0.0.1:7002: OK
Connecting to node 127.0.0.1:7003: OK
Connecting to node 127.0.0.1:7004: OK
Connecting to node 127.0.0.1:7005: OK
>>> Performing hash slots allocation on 6 nodes...
Using 3 masters:
127.0.0.1:7000
127.0.0.1:7001
127.0.0.1:7002
Adding replica 127.0.0.1:7003 to 127.0.0.1:7000
Adding replica 127.0.0.1:7004 to 127.0.0.1:7001
Adding replica 127.0.0.1:7005 to 127.0.0.1:7002
M: 91dfd20bbb4060b81e1d6694bdf8f87ad45d3550 127.0.0.1:7000
   slots:0-5460 (5461 slots) master
M: ea7f2a0322f4b5a378d83d78c9b622267cb4262f 127.0.0.1:7001
   slots:5461-10921 (5461 slots) master
M: 3d91a7661476445fe03f8b1841f95e16c689f2b9 127.0.0.1:7002
   slots:10922-16383 (5462 slots) master
S: 39576e3bcadaa3f6c5a6283f5745a206d258625c 127.0.0.1:7003
   replicates 91dfd20bbb4060b81e1d6694bdf8f87ad45d3550
S: 7061e2adcb9a2ae08133e3fcfc163e8e09faa5f7 127.0.0.1:7004
   replicates ea7f2a0322f4b5a378d83d78c9b622267cb4262f
S: 717a262f5e52179983df520b3f43d9a31923c3be 127.0.0.1:7005
   replicates 3d91a7661476445fe03f8b1841f95e16c689f2b9
Can I set the above configuration? (type 'yes' to accept): yes
>>> Nodes configuration updated
>>> Sending CLUSTER MEET messages to join the cluster
Waiting for the cluster to join....
>>> Performing Cluster Check (using node 127.0.0.1:7000)
M: 91dfd20bbb4060b81e1d6694bdf8f87ad45d3550 127.0.0.1:7000
   slots:0-5460 (5461 slots) master
M: ea7f2a0322f4b5a378d83d78c9b622267cb4262f 127.0.0.1:7001
   slots:5461-10921 (5461 slots) master
M: 3d91a7661476445fe03f8b1841f95e16c689f2b9 127.0.0.1:7002
   slots:10922-16383 (5462 slots) master
M: 39576e3bcadaa3f6c5a6283f5745a206d258625c 127.0.0.1:7003
   slots: (0 slots) master
   replicates 91dfd20bbb4060b81e1d6694bdf8f87ad45d3550
M: 7061e2adcb9a2ae08133e3fcfc163e8e09faa5f7 127.0.0.1:7004
   slots: (0 slots) master
   replicates ea7f2a0322f4b5a378d83d78c9b622267cb4262f
M: 717a262f5e52179983df520b3f43d9a31923c3be 127.0.0.1:7005
   slots: (0 slots) master
   replicates 3d91a7661476445fe03f8b1841f95e16c689f2b9
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.

问题解决

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/canglonghacker/article/details/30694999

智能推荐

使用OGG同步Oracle12C数据至Kafka_oracle ogg12 kafka-程序员宅基地

文章浏览阅读3.8k次,点赞5次,收藏18次。一、环境操作系统:CentOS6.9软件版本:Zookeeper3.4.13,Kafka2.1.0集群架构:Node1:10.200.4.117(oracle02.auditonline.prd.df.cn)Node2:10.200.4.116(oracle03.auditonline.prd.df.cn)Node3:10.100.125.156(db01.rcas)二、OGG源端安..._oracle ogg12 kafka

巧答面试题-程序员宅基地

文章浏览阅读81次。今天收到一封面试前通知书,前提是必须通过封信上面的3个问题才有可能被约面试,下面是3个问题和我的答案,很高兴顺利通过! 1。你认为一个开发团队要有哪些角色成员?在今年内你希望成为哪个角色?在3年内你希望成为哪个角色。回答:我的觉得一个公司的开发团队应该有“西天取经四人组”,有一个领导者(唐僧)就好比项目经理去带领我们完成项目任务,还有技术总监或组长(孙...

Android编译问题_.timestamp android编译-程序员宅基地

文章浏览阅读965次。一、JDK版本问题1.安装JDK5下载:JDK5安装:cp jdk-1_5_0_22-linux-amd64.bin /usr/lib/jvm/cd /usr/lib/jvm/chmod u+x jdk-1_5_0_22-linux-amd64.bin./jdk-1_5_0_22-linux-amd64.binrm jdk-1_5_0_22-linux-amd64.bin_.timestamp android编译

iview 下拉select样式_iview实现select tree树形下拉框的示例代码-程序员宅基地

文章浏览阅读170次。本文介绍了iview实现select tree树形下拉框的示例代码,分享给大家,具体如下:html部分数据部分export const treeData= [{title: 'parent 1',expand: true,selected: true,value: '1',children: [{title: 'parent 1-1',expand: true,value: '11',childr..._iview 2.0 select树形官网

【推荐算法 学习与复现】-- 深度学习系列 -- NFM_nfm代码实现-程序员宅基地

文章浏览阅读1.1k次。和前面的模型结构上都是大差不差的,但是FM归根结底还是个二阶特征交叉的模型,NFM在在Embedding层后添加 特征交叉池化层 用于对 Embedding向量两两计算元素积操作,并对交叉特征向量求和,得到池化层的输出向量。(可能描述不清楚,可以参考下面论文给出的计算过程)再把该向量输入上层的多层全连接神经网络,进行进一步的交叉。对比前面的DeepFM模型,讲二阶特征交叉部分由并行结构改为了串联的结构,DNN在二阶交叉特征进行进一步交叉,而DeepFM是二阶交叉特征 + 一阶特征DNN,..._nfm代码实现

mysql数据库密码字段查看_mysql基本操作(数据库,表,字段,记录)-程序员宅基地

文章浏览阅读774次。连接数据库1)游客登陆(不一定能登入,登入了也啥都不能干)>: mysql2)账号密码登录>: mysql -u root -p再输入密码,没有任何提示,没有密码直接回车3)连接指定服务器的mysql>: mysql -h ip地址 -P 端口号 -u 账号 -p回车后敲入密码eg:>: mysql -hlocalhost -P3306 -uroot -p #默认端口3..._怎么查看varchar类型密码

随便推点

工资管理系统_关于薪资系统项目用到了哪些技术-程序员宅基地

文章浏览阅读5.1k次,点赞6次,收藏66次。一:设计任务书随着信息时代的到来,计算机各行各业中的应用十分广泛。职工工资管理是企事业单位非常重要的环节,通常有专用的管理软件。本课题在此背景下,要求同学使用C++面向对象程序设计一个工资管理系统。基本功能:1、职工的信息包括工号、姓名、性别、电话、家庭住址、工资,有菜单可进行功能选择;2、可添加人员的信息,并保存到数据库中;3、可删除人员的信息,输入人员编号实现删除,并保存;4、可修改人员信息:输入人员编号及其他相关信息,实现修改并保存;5、能够根据职工信息精确查询人员信息。扩展功能:1_关于薪资系统项目用到了哪些技术

docker :no such file or directory-程序员宅基地

文章浏览阅读1.7k次。---恢复内容开始---其中最主要的问题是:details: (open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory)解决方案:查看/etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt..._docker-import-3945529303/bin/json: no such file or directory

最常用计算机文件后缀名,windows系统文件后缀(扩展名)简单介绍,电脑知识普及...-程序员宅基地

文章浏览阅读2.2k次。话说文件“后缀”,应该都有所了解吧?其意义就是表示一个文件的类型。不同类型的文件有不同的作用,同时也必须用不同的工具才能打开。比如常见的.txt、.mp3、.jpg、.rar这些就是后缀。每个文件的后面都是以.xxx结尾的,不信自己看看。相信大家都知道前面几个几个后缀代表的是什么文件类型吧?.txt代表的是文本文档,也就是用记事本创建的,通常手机大多支持这种文件格式。.jpg最常用的图片格式,但是..._wbj是什么格式

Winform/C#入门编程之第三部分容器(五:选项卡控件TabControl)_c#选项卡菜单-程序员宅基地

文章浏览阅读4.8k次,点赞5次,收藏17次。简介:TabControl 包含选项卡页,这些选项卡页由通过 TabPages 属性添加的 TabPage 对象表示。 此集合中的选项卡页的顺序反映了选项卡在控件中出现的顺序。用户可以通过单击控件中的某一选项卡来更改当前的 TabPage。 您也可以通过使用下面的 TabControl 属性之一,以编程的方式更改当前的 TabPage:SelectedIndex,SelectedTab。..._c#选项卡菜单

网页调用打印机打印文件-程序员宅基地

文章浏览阅读451次。window.print()转载于:https://www.cnblogs.com/kugeliu/p/6728113.html_网页获取网络打印机文件

《Effective C++》条款07:为多态基类声明virtual析构函数_为多态基类声明 virtual 析构函数 effective c++-程序员宅基地

文章浏览阅读190次。 class Base_A{public: Base_A():element(0) {} ~Base_A() { cout << "调用A的析构函数" << endl; } void print(int a) { cout << a << endl; } void print(float a) { cout << a &.._为多态基类声明 virtual 析构函数 effective c++