Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Improve dependency resolution conflict messages #1128

Closed
dchelimsky opened this Issue · 7 comments

7 participants

David Chelimsky Jeff Bellegarde Einar Jonsson André Arko Xavier Shay Elia Schito Zachary Scott
David Chelimsky

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.

André Arko indirect was assigned
Jeff Bellegarde

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.

Einar Jonsson

@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?

André Arko
Owner

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

Xavier Shay
Collaborator

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 Schito

@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 Schito

I think this is now fixed on master by #2756

Zachary Scott
Collaborator

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

Zachary Scott zzak closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.