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

bundle command throws error #3925

Closed
Scosentino opened this issue Aug 9, 2015 · 10 comments
Closed

bundle command throws error #3925

Scosentino opened this issue Aug 9, 2015 · 10 comments

Comments

@Scosentino
Copy link

  • What did you do?
  • What did you expect to happen?
  • What happened instead?

Error details

ArgumentError: no HTTP request path given
/usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/net/http/generic_request.rb:24:in `initialize'
/usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/net/http/request.rb:14:in `initialize'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/fetcher.rb:294:in `new'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/fetcher.rb:294:in `request'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/fetcher.rb:270:in `fetch'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/fetcher.rb:242:in `use_api'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/source/rubygems.rb:301:in `block in api_fetchers'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/source/rubygems.rb:301:in `select'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/source/rubygems.rb:301:in `api_fetchers'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/source/rubygems.rb:306:in `block in remote_specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/index.rb:9:in `build'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/source/rubygems.rb:305:in `remote_specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/source/rubygems.rb:79:in `specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/definition.rb:204:in `block (2 levels) in index'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/definition.rb:202:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/definition.rb:202:in `block in index'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/index.rb:9:in `build'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/definition.rb:199:in `index'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/definition.rb:193:in `resolve'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/definition.rb:132:in `specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/definition.rb:121:in `resolve_remotely!'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/installer.rb:79:in `run'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/installer.rb:18:in `install'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/cli/install.rb:80:in `run'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/cli.rb:157:in `install'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/cli.rb:10:in `start'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/bin/bundle:20:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/bin/bundle:18:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'

Environment

Bundler   1.9.4
Rubygems  2.4.5
Ruby      2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
GEM_HOME  /usr/local/lib/ruby/gems/2.2.0
GEM_PATH  /usr/local/lib/ruby/gems/2.2.0:/Users/Scosentino/.gem/ruby/2.2.0:/usr/local/Cellar/ruby/2.2.2/lib/ruby/gems/2.2.0
Git       2.3.5

You can find the repo here https://github.com/Scosentino/towboatislamorada

@Scosentino
Copy link
Author

Im trying to deploy to heroku and heroku tells me i need a Gemfile.lock but when i try to run the bundle command i get the above error

@segiddins
Copy link
Member

Can you please share your Gemfile? Thanks!

@Scosentino
Copy link
Author

source "https:rubygems.org"
ruby "2.2.2"
gem 'sinatra'

@segiddins
Copy link
Member

Ah looks like we need to do a better job validating source URLs to show a nice error. Thanks!

@segiddins
Copy link
Member

(You can fix things yourself in the meantime by changing the URL to be a valid one, https://rubygems.org)

@Scosentino
Copy link
Author

Great!! Can I help write the contributing code? Or get some kind of credit

@Scosentino
Copy link
Author

:)

@segiddins
Copy link
Member

Feel free :) The change will probably be somewhere in lib/bundler/source/rubygems.rb to validate the URL

@Scosentino
Copy link
Author

A bit beyond my level.. lol maybe next time

@agis
Copy link
Contributor

agis commented Aug 9, 2015

@segiddins Hello! I took a shot and opened #3929. Doing this in the Downloader seemed better to me since this case could also be non-rubygems specific. Not sure if this is the correct way though as I'm unfamiliar with the codebase.

homu added a commit that referenced this issue Aug 19, 2015
Be stricter when accepting rubygems source URIs

Since `URI#parse` accepts URIs such as *http:rubygems.org* as per RFC 2396,
we reject such sources manually early in the process, in order to provide more
helpful error messages.

Fixes #3925.
homu added a commit that referenced this issue Aug 21, 2015
Be stricter when accepting rubygems source URIs

Since `URI#parse` accepts URIs such as *http:rubygems.org* as per RFC 2396,
we reject such sources manually early in the process, in order to provide more
helpful error messages.

Fixes #3925.
homu added a commit that referenced this issue Aug 21, 2015
Be stricter when accepting rubygems source URIs

Since `URI#parse` accepts URIs such as *http:rubygems.org* as per RFC 2396,
we reject such sources manually early in the process, in order to provide more
helpful error messages.

Fixes #3925.
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

3 participants