我试图使用以下命令在我的OS X终端上安装指南针:
sudo gem install compass
但错误提示:
ERROR: Could not find a valid gem 'compass' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ECONNREFUSED: Connection refused - Connection refused (https://rubygems.org/latest_specs.4.8.gz) ERROR: Possible alternatives: compass
造成这种情况的原因是什么?
然后我用谷歌搜索并发现了同样的问题:
Errno::ECONNREFUSED No connection could be made because
但我不明白以下命令如何解决问题:
Try to use environment variables to set the proxies:
export http_proxy="http://user:pass@server.com:port"
export HTTP_PROXY="http://user:pass@server.com:port"
我只在我的localhost上安装指南针。 USER,PASS和@SERVER应该被替换为什么? 提前谢谢
答案 0 :(得分:2)
通过此链接修复我的代理后,我已经成功安装了指南针:
http://www.cyberciti.biz/faq/linux-unix-set-proxy-environment-variable/
基本上我只是在终端上执行了以下命令:
$ export http_proxy=http://server-ip:port/
$ export http_proxy=http://127.0.0.1:3128/