Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue installing gems on windows 7 with proxy

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?

like image 724
Adi Avatar asked May 17 '12 10:05

Adi


People also ask

How do I install specific versions of gems?

Use `gem install -v` You may already be familiar with gem install , but if you add the -v flag, you can specify the version of the gem to install. Using -v you can specify an exact version or use version comparators.


1 Answers

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:[email protected]:8080/

Hope that helps

like image 105
Luis Lavena Avatar answered Nov 15 '22 06:11

Luis Lavena