Howdy list,
I believe that I stumbled across a bug in RubyGems. I apologize if this
is
the wrong place to send such a report, but I could find nowhere else.
So, I am required to go through a proxy server for outbound port 80
traffic.
Any outbound traffic on 80 that isn’t to the proxy server does not go
anywhere at all, including attempts to install gems.
No big deal, right? Gem supports HTTP proxies, and I think you are
supposed
to specify like this:
computer:~ nevans$ sudo gem install --remote --http-proxy
http://: rmail
However, this would not work. I would get the following error:
ERROR: While executing gem … (Errno::ECONNREFUSED)
Connection refused - connect(2)
Whenever I set the environment variable http_proxy, it would install
packages without giving me this error.
I came up with changing the call to @fetcher_class.new in the
download_gem
method in remote_install.rb:
rsf = @fetcher_class.new(source, @options[:http_proxy]) #
@proxy_uri)
It was using @proxy_uri, which I determined was not being set. I’m not
sure
if this is the most correct fix, but it seems to be working for me now.
I am using RubyGem version 0.9.0 and Ruby 1.8.4 on OS X 10.4.7.