Ruby gem installation problem on Mac which is behind firewall

为君一笑 提交于 2020-01-01 09:03:28

问题


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


回答1:


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>



回答2:


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


来源:https://stackoverflow.com/questions/3111181/ruby-gem-installation-problem-on-mac-which-is-behind-firewall

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