Ruby gem installation problem on Mac which is behi

2019-04-06 22:03发布

Please provide me solution for the problem of, 1) How to install ruby gems on a Mac (OS X 10.5.1) which is behind a corporate firewall.

Regards, Sun

标签: ruby proxy gem
2条回答
Lonely孤独者°
2楼-- · 2019-04-06 22:21

Assuming that you use an HTTP proxy, there is a --http-proxy option for the gem app.

gem install --http-proxy http://corporate-proxy:1234 <gem_name>
查看更多
干净又极端
3楼-- · 2019-04-06 22:37

On my Mac which has the default ruby installed on it. I use the script below and it worked:

sudo gem install <gem_name> -p http://corporate-proxy:1234
查看更多
登录 后发表回答