How to Update Ruby Gems from Behind a Proxy (Isa-Ntlm)

How do I update Ruby Gems from behind a Proxy (ISA-NTLM)

I wasn't able to get mine working from the command-line switch but I have been able to do it just by setting my HTTP_PROXY environment variable. (Note that case seems to be important). I have a batch file that has a line like this in it:

SET HTTP_PROXY=http://%USER%:%PASSWORD%@%SERVER%:%PORT%

I set the four referenced variables before I get to this line obviously. As an example if my username is "wolfbyte", my password is "secret" and my proxy is called "pigsy" and operates on port 8080:

SET HTTP_PROXY=http://wolfbyte:secret@pigsy:8080

You might want to be careful how you manage that because it stores your password in plain text in the machine's session but I don't think it should be too much of an issue.

Install Ruby gems behind NTLM proxy

You can use cntlm http://cntlm.sourceforge.net/, so that you have a local proxy that requires no authentication (which in turns connects to the ntlm proxy).

Also: How do I update Ruby Gems from behind a Proxy (ISA-NTLM)

Installing Ruby Gems behind a Proxy

I never ended up getting gems to install behind my company's proxy. Instead I ended up downloading the gems directly and then installing them from my local downloads folder.

Issue installing gems on windows 7 with proxy

The HTTP_PROXY syntax needs to be URI:

SET HTTP_PROXY=scheme://user:pass@host:port/path

scheme could be http or https and on some cases path could be absent.

No browser (or RubyGems) will accept as valid URL the one you provided.

So in your case:

SET HTTP_PROXY=http://username:password@proxyhere.com:8080/

Hope that helps

Installing gems from behind a corporate firewall

I've retested this since the gemcutter.org folks made the mode to Amazon's Cloudfront and am able to download gems again through my employer's firewall.



Related Topics



Leave a reply



Submit