views:

26

answers:

1

The other question (here: ) had solutions that I tried but they didn't work.

I am behind a proxy at work, and can't figure out how to get RubyGems to work through it.

Here's some output to help:

josiah@BOX-OF-DOOOM:/etc$ export HTTP_PROXY=http://jkiehl:[email protected]:80/
josiah@BOX-OF-DOOOM:/etc$ sudo gem i cucumber
ERROR:  http://rubygems.org/ does not appear to be a repository
ERROR:  Could not find a valid gem 'cucumber' (>= 0) in any repository
josiah@BOX-OF-DOOOM:/etc$ sudo gem i -p cucumber
ERROR:  While executing gem ... (OptionParser::InvalidArgument)
    invalid argument: -p cucumber
josiah@BOX-OF-DOOOM:/etc$ sudo gem i -P cucumber
ERROR:  While executing gem ... (OptionParser::InvalidArgument)
    invalid argument: -P 
josiah@BOX-OF-DOOOM:/etc$ sudo gem i --http-proxy cucumber
ERROR:  While executing gem ... (OptionParser::InvalidArgument)

Any ideas? I'm baffled.

+2  A: 

Just pass the proxy URL as the --http-proxy argument.

sudo gem install --http-proxy http://jkiehl:[email protected]:80 cucumber
igorw
I thought it operated on the HTTP_PROXY var... Thanks so much!
Josiah Kiehl
Helped me out. Thanks
fletcher