How can I install Ruby gems on a Mac behind a corp

2019-07-07 02:29发布

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?

2条回答
看我几分像从前
2楼-- · 2019-07-07 02:41

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.

查看更多
贼婆χ
3楼-- · 2019-07-07 02:54

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

gem install gem_file.gem
查看更多
登录 后发表回答