1

Problem description:

I try to install a gem, say, sass:

gem install sass

And get this answer:

Errno::ETIMEOUT: A connection attempt failed because the connected partydid not properly respond after a period of time, or established connection failed because connected host failed to respond. - connect(2) for "api.rubygems.org" port 443 (https://api.rubygems.org/specs.4.8.gz)

What I have tried:

Add a http source from where to retrieve the gems, and remove the https.

gem source -a "http://rubygems.org" 
gem source -r "https://rubygems.org"

Big mistake... Now I cannot add back any of these sources because I carry on not being able to receive a response from them.

I have reinstalled ruby.

I have turned on and off my computer and contacted the IT crowd...

Anyone?

this did not help either.

SenhorLucas
  • 1,337
  • 12
  • 12
  • Are you behind a Proxy? – mhutter Jan 21 '15 at 16:16
  • Yes. Then I added the environmental variable:HTTP_PROXY=http://username:password@proxy:port. But weirdly the error changes to "authentication required" as if it didn't recognize my login data. I am not admin, but you shouldn't need admin priviledges to access a website... Moreover, I can "ping" google.com ... – SenhorLucas Jan 22 '15 at 06:29
  • Try changing it to `HTTP_PROXY=http://user:pass@proxy:port`, and try also setting `HTTPS_PROXY` to the same value (also `http://...`). – mhutter Jan 22 '15 at 10:53
  • Check the first two answers: http://stackoverflow.com/questions/4418/how-do-i-update-ruby-gems-from-behind-a-proxy-isa-ntlm – mhutter Jan 22 '15 at 10:56
  • Thanks guys. I tried your suggestions and both lead me to a `407 HTTP error: authentication required` – SenhorLucas Jan 23 '15 at 07:40
  • I'm hitting this error as well. Could it be because port 443 is in use by some other service e.g APACHE? – Nanthini Muniapan Apr 03 '15 at 07:53

0 Answers0