无法运行" rhc setup"

时间:2014-08-09 23:52:55

标签: ruby openshift openshift-client-tools

安装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>'

宝石安装成功执行。请参阅下面的输出:

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>'

需要一些有关如何修复此错误的建议。

由于

2 个答案:

答案 0 :(得分:2)

您之前是否安装过红宝石,可能会忘记它?看起来它正试图在C:/ Ruby200-x64 / bin文件夹中找到可能没有它的gem。 尝试检查您的程序并卸载所有版本的Ruby&amp;再次安装ver 1.9.3 - 从我收集的内容中最适合Windows。

答案 1 :(得分:0)

尝试从我的cygwin shell调用rhc setup时遇到类似的错误。看一下ruby安装,我发现了一个rhc shell脚本和一个rhc.bat Windows脚本。我能够从我的Cygwin shell运行rhc.bat而不会遇到错误。