Error installing gems on windows 7 with proxy server

I am trying to install ruby ​​on windows 7 for a proxy.

I went through various forums and successfully installed (I think) http_proxy (see below)

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

however, now I get the following error trying to install the gem:

 SocketError: getaddrinfo: No such host is known. 

Any ideas?

+8
ruby ruby-on-rails gem
source share
2 answers

HTTP_PROXY syntax must be a URI:

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

scheme may be http or https , and in some cases path may be missing.

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

So in your case:

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

Hope that helps

+12
source share

At work, I also have Proyx, SET HTTP_PROXY=http://proxyhere.com:8080 works there, so try without using a username and password. It depends on the type of proxy server.

You can also use:

 gem install --http-proxy http://proxyhere.com:8080 $gem_name 

See This for more information. How do I upgrade Ruby Gems due to proxy (ISA-NTLM)

+4
source share

All Articles