Home » Questions » Computers [ Ask a new question ]

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

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

"The firewall I'm behind is running Microsoft ISA server in NTLM-only mode. Hash anyone have success getting their Ruby gems to install/update via Ruby SSPI gem or other method?

... or am I just being lazy?

Note: rubysspi-1.2.4 does not work.

This also works for ""igem"", part of the IronRuby project"

Asked by: Guest | Views: 378
Total answers/comments: 4
Guest [Entry]

"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."
Guest [Entry]

"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."
Guest [Entry]

"This totally worked:

gem install --http-proxy http://COMPANY.PROXY.ADDRESS $gem_name"
Guest [Entry]

"I've been using cntlm (http://cntlm.sourceforge.net/) at work. Configuration is very similar to ntlmaps.

gem install --http-proxy http://localhost:3128 _name_of_gem_

Works great, and also allows me to connect my Ubuntu box to the ISA proxy.

Check out http://cntlm.wiki.sourceforge.net/ for more information"