Cannot get latest version of rhc on Mac

The OpenShift forums have been retired.
You can still read and search them, but for help, please post a question on Stack Overflow.

I have Mac OS X Lion and rhc 1.1.11... I did gem install rhc 2 days ago and this is what it installed. Yesterday I did gem update rhc. After waiting 5 minutes for the gem to reply, it said it was up to date. How do I get the latest version of rhc?

What version of ruby & gem are you using? OS X comes with ruby 1.8.7 if i remember correctly. Are you using RVM? Try installing ruby 1.9.3 with RVM then install rhc

Lion might have 1.8.6, mountain lion has 1.8.7.

ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin11.4.2] Gem: 1.8.24

Weird, exact same that I have and i get 1.7.8 try doing a gem uninstall rhc, then reinstall?

That is rather strange. The latest version is 1.7.8 as of this writing (https://rubygems.org/gems/rhc). If you are not getting this version, I suspect that your gem source might be somehow wrong.

Could you show the output of gem env command? In particular, what is your gem source?

RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.24
  - RUBY VERSION: 1.9.3 (2012-11-10 patchlevel 327) [x86_64-darwin11.4.2]
  - INSTALLATION DIRECTORY: /Users/username/.rvm/gems/ruby-1.9.3-p327
  - RUBY EXECUTABLE: /Users/username/.rvm/rubies/ruby-1.9.3-p327/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/username/.rvm/gems/ruby-1.9.3-p327/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-11
  - GEM PATHS:
     - /Users/username/.rvm/gems/ruby-1.9.3-p327
     - /Users/username/.rvm/gems/ruby-1.9.3-p327@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

If I do an install it takes 5 minutes lol, same as update. I saw on rubygems bug reporting that they fixed this the other day but I still have this issue. I will uninstall and then reinstall.

I did an uninstall and reinstall (I didn't use sudo so it didn't install) but it is still wanting to install 1.1.11

gem install rhc
WARNING:  Error fetching data: too many connection resets (http://production.s3.rubygems.org/latest_specs.4.8.gz)
WARNING:  Error fetching data: too many connection resets (http://production.s3.rubygems.org/specs.4.8.gz)
Fetching: rhc-1.1.11.gem (100%)

How about if you specify the version with --version flag?

gem install rhc --version 1.7.8

sudo gem install rhc --version 1.7.8
Password:
WARNING:  Error fetching data: too many connection resets (http://production.s3.rubygems.org/specs.4.8.gz)
ERROR:  Could not find a valid gem 'rhc' (= 1.7.8) in any repository
WARNING:  Error fetching data: too many connection resets (http://production.s3.rubygems.org/latest_specs.4.8.gz)
ERROR:  Possible alternatives: rhc

No dice.

EDIT:

gem list rhc --remote --all
 
*** REMOTE GEMS ***
 
WARNING:  Error fetching data: too many connection resets (http://production.s3.rubygems.org/specs.4.8.gz)
rhc (1.2.7, 1.1.11, 1.0.4, 0.98.16, 0.97.17, 0.96.9, 0.95.14, 0.95.13, 0.94.8, 0.93.19, 0.93.18, 0.92.11, 0.91.12, 0.91.11, 0.90.7, 0.90.6, 0.88.9, 0.87.8, 0.86.7, 0.85.12, 0.84.15, 0.84.13, 0.83.9, 0.82.18, 0.81.14, 0.80.5, 0.79.5, 0.77.8, 0.75.9, 0.74.6, 0.74.5, 0.73.14, 0.72.29, 0.71.2, 0.69.6, 0.69.3, 0.68.5)
rhc-rest (0.0.14, 0.0.7)
rhcp (0.2.19, 0.2.18, 0.2.17, 0.2.16, 0.2.15, 0.2.14, 0.1.9, 0.1.8, 0.1.7, 0.1.6, 0.1.5, 0.1.4, 0.1.3, 0.1.2)
rhcp_shell (0.2.13, 0.2.12, 0.2.11, 0.0.9, 0.0.7, 0.0.6, 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1)

Can you try rvm install 1.9.3 which should give you ruby-1.9.3-p385, and then try to gem install rhc and see what you get, sounds like your rvm is messed up for that version or maybe you have a proxy connection to rubygems.org?

You can also try to download it here and see if it will install... http://rubygems.org/gems/rhc

It just wants to reinstall p327.

Have you upgraded your rvm? rvm get stable and see if that upgrades you, there is a newer 1.9.3, sounds like your rvm needs updated.

run gem env and check what remote source your machine is set up to use. Mine is set to use

Not sure if any of the suggestions from this thread might help: http://stackoverflow.com/questions/10278174/gem-not-installing-showing-connection-error

I have read that one and didn't notice anything helpful. Also per my gem env I already have that remote source. I am trying a ruby update right now.

Could you please try gem install -V rhc -v 1.7.8 and post output ? This will turn verbose output on

$ gem install -V rhc -v 1.7.8
GET http://rubygems.org/specs.4.8.gz
302 Moved Temporarily
GET http://production.s3.rubygems.org/specs.4.8.gz
connection reset after 1 requests, retrying
GET http://production.s3.rubygems.org/specs.4.8.gz
connection reset after 1 requests, retrying
WARNING:  Error fetching data: too many connection resets (http://production.s3.rubygems.org/specs.4.8.gz)
ERROR:  Could not find a valid gem 'rhc' (= 1.7.8) in any repository
GET http://rubygems.org/latest_specs.4.8.gz
connection reset after 2 requests, retrying
GET http://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
GET http://production.s3.rubygems.org/latest_specs.4.8.gz
connection reset after 2 requests, retrying
GET http://production.s3.rubygems.org/latest_specs.4.8.gz
connection reset after 1 requests, retrying
WARNING:  Error fetching data: too many connection resets (http://production.s3.rubygems.org/latest_specs.4.8.gz)
ERROR:  Possible alternatives: rhc

what do you get from rvm -v ? I still think you need to upgrade rvm

Interesting response.

Could it be that you are behind proxy that requires credentials to get through and your "gem" tool simply can not pass it?

If so, try to load and install gem manually like explained here: http://stackoverflow.com/questions/5778804/installing-ruby-gems-manually

P.S. I believe your session above lasted just few seconds.

I also checked below files: