0

I am unable to execute the command "rhc setup" after installation of gem. I used a windows installer from rubyinstallersr.org. Please see output below after executing 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 installation was executed successfuly. Please see output below:

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

Need some advice on how to fix this error.

Thanks

timo.rieber
  • 3,727
  • 3
  • 32
  • 47
Johann
  • 923
  • 2
  • 8
  • 16

2 Answers2

2

Have you installed ruby before and maybe forgot about it? It looks like it's trying to find the gem in the C:/Ruby200-x64/bin folder which probably doesn't have it. Try checking your programs and uninstall all versions of Ruby & install again ver 1.9.3 - that works best on windows from what I gathered.

Ioana Grozav
  • 135
  • 1
  • 7
0

I had a similar error when trying to invoke rhc setup from my cygwin shell. Taking a look at the ruby installation, I found both a rhc shell script and a rhc.bat Windows script. I was able to run rhc.bat from my Cygwin shell without hitting the error.

Robin Coe
  • 750
  • 7
  • 28