ruby下gem-fast设置代理错误


有时候公司内网需要设置HTTP代理才能连接公网,下面列出一些Gem及Git的代理设置方法

设置Git代理

$git config --global http.proxy http://192.128.1.3:80 
$ git config -l
http.proxy=http://192.128.1.3:80

设置Gem代理

$ export http_proxy=http://192.128.1.3:80 
gem install rails --http-proxy $http_proxy

让Bundler使用HTTP代理环境设置

sudo -E bundle ...

非Root用户设置代理后gem-fast会报错

如果你是非root用户,比如用Git用户设置http代理后,使用gem-fast会报如下错误:

curl: (7) couldn't connect to host 
ERROR: While executing gem ... (GemFast::Util::ExecutionError) Failure while executing: curl -f#LA rubygem-gemfast http://ruby.taobao.org/quick/Marshal.4.8/bundler-1.3.5.gemspec.rz --insecure -o /home/git/local/lib/ruby/gems/1.9.1/cache/bundler-1.3.5.gemspec.rz

目前的还没找到根本的解决办法,原因是授权的问题,因为root用户执行就不报错,所以只能卸载gem-fast,这样就不报错了,但是就不能使用gem-fast的快速下载功能了。那位牛人能解决这个问题请告之小弟,谢谢!

2013-06-12

posted on 2013-06-13 07:58 kuuyee 阅读(2385) 评论(0)  编辑  收藏 所属分类: Ruby/Python/Ceylon


只有注册用户登录后才能发表评论。


网站导航:
 

导航

<2013年6月>
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

统计

随笔分类(139)

Linux内核

搜索

积分与排名

最新评论

阅读排行榜