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

path conflicts with secondary source in Gemfile #3414

Closed
harto opened this issue Feb 17, 2015 · 9 comments
Closed

path conflicts with secondary source in Gemfile #3414

harto opened this issue Feb 17, 2015 · 9 comments

Comments

@harto
Copy link

harto commented Feb 17, 2015

See https://gist.github.com/harto/0dfcee489e248900feb8 for reproduction.

Suppose a Gemfile references one gem from a local path and another from a secondary source, e.g.:

source "https://rubygems.org"
gem "local_gem", path: "local_gem"
gem "other_gem", source: "https://gems.example.com"

If I bundle install, the dependencies are apparently resolved and installed correctly. However, the bundle fails at runtime:

$ bundle exec ruby -e 'puts "hello"'
Could not find gem 'other_gem (>= 0) ruby' in rubygems repository https://gems.example.com/.
Source does not contain any versions of 'other_gem (>= 0) ruby'
Run `bundle install` to install missing gems.

Removing local_gem and running bundle install again appears to fix the problem:

$ bundle exe ruby -e 'puts "hello"'
hello

The local_gem doesn't have any dependencies. Again, see https://gist.github.com/harto/0dfcee489e248900feb8 for a minimal complete example.

@pda
Copy link

pda commented Feb 17, 2015

Confirmed in Bundler 1.8.0 and 1.8.2.

@sheerun
Copy link

sheerun commented Feb 18, 2015

It breaks our service: tenex/rails-assets#226

@eagletmt
Copy link
Contributor

Same here.

I found reverting 9263e08 solves the issue in my environment.

@harto harto changed the title path appears to conflict with secondary source in Gemfile path conflicts with secondary source in Gemfile Feb 18, 2015
@TimMoore
Copy link
Contributor

I have a proposed fix at #3427. If fixes the test cases here and in #3417, but if you could try it on your real-world projects too, that would be awesome.

@TimMoore
Copy link
Contributor

This should be fixed in Bundler 1.8.3 (released today).

@eagletmt
Copy link
Contributor

I tried Bundler 1.8.3, but the same error still occurs in my environment.

@TimMoore
Copy link
Contributor

@eagletmt can you create a new issue and include the output from bundle env?

@eagletmt
Copy link
Contributor

I'll submit a new issue after a bit more investigation.

@eagletmt
Copy link
Contributor

@TimMoore submitted #3430

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

Successfully merging a pull request may close this issue.

5 participants