carlhuda/bundler — Issue #1702: Bundler doesn't work with proxy? (JRuby/Windows)
Author: arkadiyk
Created: 2012-03-08 01:29:31+00:00
State: open

Not 100% sure if this is a proxy or generic JRuby issue.
bundler-1.0.21 works just fine with http_proxy env var pointing to company's anonymous proxy

Here is the stack trace when I do not set `http_proxy` env var:

```
D:\project>jruby -S -Xerrno.backtrace=true bundle update
Fetching gem metadata from http://rubygems.org/.
Error Bundler::HTTPError during request to dependency API
Fetching full source index from http://rubygems.org/
Network error while fetching http://rubygems.org/quick/Marshal.4.8/jdbc-jtds-1.2.5.gemspec.rz
```

Here is the stack trace when I set `http_proxy` env var to point to company's anonymous proxy:

```
D:\project>jruby -S -Xerrno.backtrace=true bundle update
Fetching gem metadata from http://rubygems.org/.Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks!
Errno::EAGAIN: Resource temporarily unavailable -
read_nonblock at org/jruby/RubyIO.java:2569
rbuf_fill at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/vendor/net/http/faster.rb:15
readuntil at d:/sw/jruby-1.6.6/lib/ruby/1.8/net/protocol.rb:116
readline at d:/sw/jruby-1.6.6/lib/ruby/1.8/net/protocol.rb:126
read_status_line at d:/sw/jruby-1.6.6/lib/ruby/1.8/net/http.rb:2026
read_new at d:/sw/jruby-1.6.6/lib/ruby/1.8/net/http.rb:2015
request at d:/sw/jruby-1.6.6/lib/ruby/1.8/net/http.rb:1051
request at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/vendor/net/http/persistent.rb:363
fetch at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/fetcher.rb:135
fetch_dependency_remote_specs at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/fetcher.rb:162
fetch_remote_specs at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/fetcher.rb:122
specs at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/fetcher.rb:70
remote_specs at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/source.rb:234
each at org/jruby/RubyArray.java:1614
remote_specs at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/source.rb:232
fetch_specs at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/source.rb:165
specs at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/source.rb:70
index at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/definition.rb:205
each at org/jruby/RubyArray.java:1614
index at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/definition.rb:202
build at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/index.rb:9
index at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/definition.rb:198
resolve at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/definition.rb:192
specs at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/definition.rb:127
resolve_remotely! at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/definition.rb:122
run at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/installer.rb:46
install at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/installer.rb:12
update at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/cli.rb:271
send at org/jruby/RubyKernel.java:2074
run at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/vendor/thor/task.rb:21
invoke_task at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/vendor/thor/invocation.rb:118
dispatch at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/vendor/thor.rb:263
start at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/vendor/thor/base.rb:386
(root) at d:/sw/jruby-1.6.6/lib/ruby/gems/1.8/gems/bundler-1.1.0/bin/bundle:13
load at org/jruby/RubyKernel.java:1052
(root) at d:/sw/jruby-1.6.6/bin/bundle:19
```