安装 gem 后,我无法执行命令“rhc setup”。我使用了来自 rubyinstallersr.org 的 Windows 安装程序。请在执行 rhc setup 后查看以下输出:
> C:\Users\Admin>rhc setup
> /usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find rh
> (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.8.0, minitest-2.5.1,
> ake-10.0.4, rdoc-3.12.2] (Gem::LoadError)
> from /usr/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
> from /usr/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
> from C:/Ruby200-x64/bin/rhc:22:in `<main>'
Gem 安装已成功执行。请看下面的输出:
C:\Users\Admin>ruby -e 'puts "hello world"'
hello world
C:\Users\Admin>ruby -v
ruby 1.9.3p545 (2014-02-24) [x86_64-cygwin]
C:\Users\Admin>gem install rhc
Fetching: net-ssh-2.9.1.gem (100%)
Successfully installed net-ssh-2.9.1
Fetching: net-scp-1.2.1.gem (100%)
Successfully installed net-scp-1.2.1
Fetching: net-ssh-gateway-1.2.0.gem (100%)
Successfully installed net-ssh-gateway-1.2.0
Fetching: net-ssh-multi-1.2.0.gem (100%)
Successfully installed net-ssh-multi-1.2.0
Fetching: archive-tar-minitar-0.5.2.gem (100%)
Successfully installed archive-tar-minitar-0.5.2
Fetching: highline-1.6.21.gem (100%)
Successfully installed highline-1.6.21
Fetching: commander-4.2.0.gem (100%)
Successfully installed commander-4.2.0
Fetching: httpclient-2.4.0.gem (100%)
Successfully installed httpclient-2.4.0
Fetching: open4-1.3.4.gem (100%)
Successfully installed open4-1.3.4
Fetching: rhc-1.28.5.gem (100%)
===========================================================================
If this is your first time installing the RHC tools, please run 'rhc setup'
===========================================================================
Successfully installed rhc-1.28.5
Parsing documentation for net-ssh-2.9.1
Installing ri documentation for net-ssh-2.9.1
Parsing documentation for net-scp-1.2.1
Installing ri documentation for net-scp-1.2.1
Parsing documentation for net-ssh-gateway-1.2.0
Installing ri documentation for net-ssh-gateway-1.2.0
Parsing documentation for net-ssh-multi-1.2.0
Installing ri documentation for net-ssh-multi-1.2.0
Parsing documentation for archive-tar-minitar-0.5.2
Installing ri documentation for archive-tar-minitar-0.5.2
Parsing documentation for highline-1.6.21
Installing ri documentation for highline-1.6.21
Parsing documentation for commander-4.2.0
Installing ri documentation for commander-4.2.0
Parsing documentation for httpclient-2.4.0
Installing ri documentation for httpclient-2.4.0
Parsing documentation for open4-1.3.4
Installing ri documentation for open4-1.3.4
Parsing documentation for rhc-1.28.5
Installing ri documentation for rhc-1.28.5
10 gems installed
C:\Users\Admin>gem update rhc
Updating installed gems
Nothing to update
C:\Users\Admin>rhc setup
/usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find rh
(>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.8.0, minitest-2.5.1,
ake-10.0.4, rdoc-3.12.2] (Gem::LoadError)
from /usr/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /usr/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
from C:/Ruby200-x64/bin/rhc:22:in `<main>'
需要一些有关如何修复此错误的建议。
谢谢