gem与代理设置

来源:互联网 发布:人生就像编程 编辑:程序博客网 时间:2024/04/27 15:22
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
原创粉丝点击