gem与代理设置

I'm behind an authenticated proxy and RubyGems doesn't seem to support username/password based authentication.

Some investigation seems to indicate that open-uri.rb doesn't support authentication. open-uri is based on Net::HTTP
which *does* support authentication so it should be relatively easy to modify open-uri to do that too. I spent about
an hour on it, but couldn't immediately get something working (open-uri is using Net::HTTP in a somewhat quirky way).

C:/>gem -v

C:/>"c:/ruby/bin/ruby.exe" "c:/ruby/bin/gem" -v
0.8.3

C:/>gem list -p http://proxy:8080 -r --backtrace

C:/>"c:/ruby/bin/ruby.exe" "c:/ruby/bin/gem" list -p http://proxy1.macbank:8080 -r --backtrace
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值