Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

:no_proxy in .gemrc causes bundler to fail #4294

Closed
ttrmw opened this issue Feb 11, 2016 · 0 comments
Closed

:no_proxy in .gemrc causes bundler to fail #4294

ttrmw opened this issue Feb 11, 2016 · 0 comments

Comments

@ttrmw
Copy link

ttrmw commented Feb 11, 2016

I ran the command /home/tmillwardwright/.rbenv/versions/2.2.3/bin/bundler with :no_proxy set as the value of http_proxy in my .gemrc, and the following error was thrown:



    URI::InvalidURIError: bad URI(is not URI?): no_proxy
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/2.2.0/uri/rfc3986_parser.rb:17:in `rescue in split'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/2.2.0/uri/rfc3986_parser.rb:14:in `split'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/2.2.0/uri/rfc3986_parser.rb:72:in `parse'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/2.2.0/uri/common.rb:226:in `parse'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/fetcher.rb:225:in `connection'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/fetcher.rb:72:in `initialize'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/source/rubygems.rb:231:in `new'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/source/rubygems.rb:231:in `block in fetchers'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/source/rubygems.rb:229:in `map'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/source/rubygems.rb:229:in `fetchers'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/source/rubygems.rb:335:in `block in remote_specs'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/index.rb:9:in `build'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/source/rubygems.rb:334:in `remote_specs'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/source/rubygems.rb:81:in `specs'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/definition.rb:209:in `block (2 levels) in index'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/definition.rb:207:in `each'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/definition.rb:207:in `block in index'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/index.rb:9:in `build'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/definition.rb:204:in `index'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/definition.rb:198:in `resolve'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/definition.rb:137:in `specs'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/definition.rb:126:in `resolve_remotely!'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/installer.rb:194:in `resolve_if_need'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/installer.rb:69:in `run'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/installer.rb:21:in `install'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/cli/install.rb:105:in `run'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/cli.rb:172:in `install'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/cli.rb:10:in `start'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/exe/bundler:19:in `block in <top (required)>'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'
      /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/exe/bundler:17:in `<top (required)>'
      /home/tmillwardwright/.rbenv/versions/2.2.3/bin/bundler:23:in `load'
      /home/tmillwardwright/.rbenv/versions/2.2.3/bin/bundler:23:in `<main>'

Environment

Bundler   1.11.2
Rubygems  2.4.5.1
Ruby      2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
GEM_HOME  /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0
GEM_PATH  /home/tmillwardwright/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0:/home/tmillwardwright/.gem/ruby/2.2.0
Git       1.9.1

Bundler settings

gem.coc
  Set for the current user (/home/tmillwardwright/.bundle/config): "false"
gem.mit
  Set for the current user (/home/tmillwardwright/.bundle/config): "true"
gem.test
  Set for the current user (/home/tmillwardwright/.bundle/config): "minitest"

my no_proxy environment variable is set to a comma delimited string of URIs & patterns. If I set http proxy to nothing in the .gemrc on a network that doesn't require the use of the proxy, bundler behaves as expected.
homu added a commit that referenced this issue Feb 16, 2016
[Fetcher] Support setting http_proxy to :no_proxy

Closes #4294
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant