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 CONFIGURATI开发者_运维技巧ON:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
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
- Check if you can access the internet
- If you're behind a HTTP proxy server, take a look at this question
- If 1 and 2 don't help you, post some more info.
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.
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
精彩评论