Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Improve dependency resolution conflict messages #1128

Closed
dchelimsky opened this Issue Apr 19, 2011 · 7 comments

Comments

Projects
None yet
7 participants

I updated some things in my Gemfile and got the following message from bundle install:

Fetching source index for http://rubygems.org/
Bundler could not find compatible versions for gem "rspec-mocks":
 In Gemfile:
   aruba (= 0.3.6) depends on
     rspec-mocks (~> 2.5.0)

   rspec-mocks (2.6.0.rc2)

I looked at aruba's dependencies and saw that it depends on rspec >= 2.5.0, not rspec-mocks ~> 2.5.0. Digging further, rspec-2.5.0 depends on rspec-mocks ~> 2.5.0, and that was the cause of the problem (rspec 2.6.0.rc2 was not in the Gemfile or in any known hosts at the time).

I was able to resolve this by including rspec-2.6.0.rc2 in the Gemfile, but it would have been awesome if the message had pointed me in that direction. Something like:

Fetching source index for http://rubygems.org/
Bundler could not find compatible versions for gem "rspec-mocks":
 In Gemfile:
   aruba (= 0.3.6) depends on
     rspec (>= 2.5.0), which depends on
       rspec-mocks (~> 2.5.0)

   rspec-mocks (2.6.0.rc2)

That would have helped me to understand the problem right away, and would certainly be even more helpful if the downstream dependencies were not part of the same suite of gems.

@ghost ghost assigned indirect Oct 2, 2011

I just burned most of a day on a simliar issue. Different gems involved, but the same limitation in UI made it hard to track down.

Output like:

In Gemfile:
aruba (= 0.3.6) depends on
   rspec-mocks (~> 2.5.0) (from rspec-2.5.0)

would have saved a lot of time.

einarj commented May 14, 2013

@indirect I'm trying to make sense of which issues are still relevant and which are not. Is this something that has been fixed in later versions?

Owner

indirect commented May 15, 2013

@einarj this bug is not yet fixed that I am aware of.

Contributor

xaviershay commented Aug 11, 2013

Can someone provide a repro? I tried the following Gemfile but it works:

source 'https://rubygems.org'

gem 'aruba', '0.3.6'
gem 'rspec-mocks', '2.5.0'

I can't figure out from the description how rspec-mocks-2.6.0.rc2 was getting added anywhere.

elia commented Dec 9, 2013

@xaviershay here's the repro

source 'https://rubygems.org'

gem 'aruba', '0.3.6'
gem 'rspec-mocks', '2.6.0.rc2'

leads to:

Using Ruby: ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.0.0] 
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "rspec-mocks":
  In Gemfile:
    aruba (= 0.3.6) ruby depends on
      rspec-mocks (~> 2.5.0) ruby

    rspec-mocks (2.6.0.rc2)

elia commented Dec 10, 2013

I think this is now fixed on master by #2756

Member

zzak commented Jan 2, 2014

I've confirmed this was fixed in master, thanks!

@zzak zzak closed this Jan 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment