3

When I run Ruby commands such as

gem install heroku

or

gem update --system

I receive the warning

ERROR:  Could not find a valid gem 'heroku' (>= 0) in any repository
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ECONNREFUSED: No connection could be made because the target machine
actively refused it. - connect(2) (http://rubygems.org/latest_specs.4.8.gz)

I've looked through several related posts, most of which suggest network issues; I've turned off all anti-virus/firewall software, but had no luck. Note that others on the same network aren't facing these problems. I'm baffled as to how to proceed.

 RubyGems Environment:  

- RUBYGEMS VERSION: 1.5.2
- RUBY VERSION: 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8
- RUBY EXECUTABLE: C:/RailsInstaller/Ruby1.8.7/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/RailsInstaller/Ruby1.8.7/bin
- RUBYGEMS PLATFORMS:
  - ruby
  - x86-mingw32
- GEM PATHS:
   - C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8
   - C:/Users/xxxxx/.gem/ruby/1.8
- GEM CONFIGURATION:
   - :update_sources => true
   - :verbose => true
   - :benchmark => false
   - :backtrace => false
   - :bulk_threshold => 1000
- REMOTE SOURCES:
   - http://rubygems.org/
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
gc20
  • 61
  • 1
  • 2
  • 5

4 Answers4

5

Old post, but this might help someone else. Specify your proxy. This seems to work even though the http_proxy environment variable is already set:

gem install heroku --http-proxy http://yourproxyserver:port
Rai
  • 394
  • 5
  • 23
1
  1. Check if you can access the internet
  2. If you're behind a HTTP proxy server, take a look at this question
  3. If 1 and 2 don't help you, post some more info.
Community
  • 1
  • 1
Gishu
  • 134,492
  • 47
  • 225
  • 308
  • I can access the internet and I'm not behind an HTTP proxy sever. I've posted gem -env details above. Does that help? – gc20 May 30 '11 at 05:52
  • @user77 - Since you ruled out network connectivity issues, firewalls and http-proxy I'm out of potential reasons. The error is a generic conn error.. so finding it tough to google out potential causes. – Gishu May 30 '11 at 06:13
0

Try and download http://rubygems.org/latest_specs.4.8.gz. Does that work? If it still dosnt work then you have a network issue.

Devin M
  • 9,636
  • 2
  • 33
  • 46
  • That works using wget, but the error persists when using 'gem install ...' There is a DNS problem reported, its not our internet connections. – JosephK Apr 04 '15 at 08:44
0

May I suggest that you download the archive: http://rubygems.org/pages/download#formats

And then installing it using the instruction give on the page.

Does this work:

$ gem install slimgems
MindTooth
  • 4,992
  • 4
  • 20
  • 15