gem sources -a http://gemcutter.org Error fetching http://gemcutter.org : Errno::ETIMEDOUT: 连接尝试失败,因为连接方在一段时间后没有正确响应,或者建立连接失败,因为连接的主机未能响应。- 连接(2)(h tp://gemcutter.org/specs.4.8.gz)
我该如何解决这个问题?
gem sources -a http://gemcutter.org Error fetching http://gemcutter.org : Errno::ETIMEDOUT: 连接尝试失败,因为连接方在一段时间后没有正确响应,或者建立连接失败,因为连接的主机未能响应。- 连接(2)(h tp://gemcutter.org/specs.4.8.gz)
我该如何解决这个问题?
您可以简单地将源代码放入主目录中的配置文件中。
cat ~/.gemrc
---
:sources:
- http://rubygems.org
当我尝试安装应用程序时,我收到了类似的消息。问题是在工作中我的电脑在代理后面。所以,我通过这样做解决了:
gem install whatever --http-proxy=http://user:pass@proxy:port
http://help.rubygems.org/discussions/problems/799-ruby-gem-install-problems-on-windows-xp