How can I install Ruby gems on a Mac behind a corporate proxy?

寵の児 提交于 2019-12-23 18:14:52

问题


I am trying to install ruby gems on my MacOS OS X 10.5.1 behind a corporate firewall proxy. But I am getting an error about connection refused.

How can I install Ruby gems on a Mac behind a corporate proxy?


回答1:


Specify the proxy to use:

export HTTP_PROXY='http://username:password@proxyserver.net:port/'

If it's a Windows proxy (common in EnterpriseLand), it will use a custom NTLM authentication, which normal Unix apps don't do. To fix it, get NTLMAPS - a small Python app that acts as a local regular proxy and handballs your credential via NTLM authentication to the Windows proxy.




回答2:


Download the gem to your harddrive and install it manually by doing

gem install gem_file.gem


来源:https://stackoverflow.com/questions/3111008/how-can-i-install-ruby-gems-on-a-mac-behind-a-corporate-proxy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!