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

Problem with resolver #2250

Closed
alexsanford opened this issue Jan 15, 2013 · 2 comments
Closed

Problem with resolver #2250

alexsanford opened this issue Jan 15, 2013 · 2 comments

Comments

@alexsanford
Copy link

I posted this issue on the Google Group: https://groups.google.com/d/msg/ruby-bundler/QToODPnprYw/roT6nDMT6coJ

And created a gist: https://gist.github.com/4538599

Here's what I posted to the group:

Hey guys,

I've been stuck with this issue for a while now, and I'm starting to think it's a bug in bundler. Here's what's happening:

  • I pull down this code: git://github.com/locomotivecms/engine.git
  • I checkout the latest RC: git checkout v2.0.0.rc12
  • I run bundle update and get the following error:
Bundler could not find compatible versions for gem "devise":
  In Gemfile:
    locomotive_cms (>= 0) ruby depends on
      devise (~> 2.1.2) ruby

    locomotive_cms (>= 0) ruby depends on
      devise (2.2.0)

This project is a rails engine, and I have some insight into why this is happening. The gemspec for this engine requires both devise (> 2.1.2) and devise-encryptable (> 0.1.1). However, devise-encryptable 0.1.1 (which is the latest version right now) requires devise (>= 2.1.0.rc). Now, it appears that bundler activates devise-encryptable first, at which point it adds the dependency to devise (>= 2.1.0.rc). It then satisfies that dependency by activating devise 2.2.0. Finally, it gets around to trying to satisfy the original devise dependency (~> 2.1.2) and fails because 2.2.0 is already activated and not compatible.

This issue does not happen consistently. If I swap the two lines in the gemspec which add the dependencies to devise and devise-encryptable (i.e. change their order), then bundle update works fine. However, if I then update the rails version in the gemspec to 3.2.11, the error returns on bundle update.

It looks to me like this is a bug in the resolver. I've attached the output from DEBUG_RESOLVER=y bundle update &> bundler.debug. Should I log an issue on github? Is there something I'm overlooking?

Thanks!
Alex

@alexsanford
Copy link
Author

It looks like this may be another duplicate of #1113 and #1184. I hope there's a fix coming soon!

@indirect
Copy link
Member

I believe this is fixed in Bundler 1.3! Enjoy. :)

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

2 participants