Issue installing gems on windows 7 with proxy

ruby, ruby-on-rails, rubygems

Solution

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

Problem

I am trying to install ruby on windows 7 behind a proxy. I have looked at various forums and have set (i think) the http_proxy successfully (see below) ``` SET HTTP_PROXY=http:username:password@http://proxyhere.com:8080 ``` however, i now get the following error trying to install a gem: ``` SocketError: getaddrinfo: No such host is known. ``` Any ideas?

Original source

Related problems