当我尝试添加source:
C:>gem source --verbose --add http://gemcutter.org
GET http://gemcutter.org/specs.4.8.gz
407 Proxy Authentication Required
Error fetching http://gemcutter.org:
bad response Proxy Authentication Required 407 (http://gemcutter.org/specs.4.8.gz)
注。我的Windows XP客户端通过代理访问web,所以我尝试:
C:>gem -v
1.8.10
C:>gem source --verbose --http-proxy http://192.168.10.24:3128 --add http://gemcutter.org
返回相同的错误。我该怎么修理它?
你需要把代理用户名和密码放在那里。
在*nix机器上,gem查找一个名为HTTP_PROXY
的环境变量。你也可以在windows上设置这个变量。
执行gem
命令前先执行SET HTTP_PROXY=http://%USER%:%PASSWORD%@192.168.10.24:3128
命令。
另一种可能性是在你的计算机上安装另一个"代理"。请参阅如何从代理(ISA-NTLM)后面更新Ruby Gems和http://ntlmaps.sourceforge.net/了解详细信息。
你可能会使用rubysspi。