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

Bundling my app doesn't work #3860

Closed
tenderlove opened this issue Jul 20, 2015 · 7 comments
Closed

Bundling my app doesn't work #3860

tenderlove opened this issue Jul 20, 2015 · 7 comments

Comments

@tenderlove
Copy link
Contributor

I'm not sure what I am doing wrong. You can see the Gemfile here (note that it's on a branch if you want to check it out).

When I bundle, the output is this:

[aaron@TC manageiq (rails5)]$ bundle update
Updating git://github.com/rest-client/rest-client.git
Updating git://github.com/ManageIQ/handsoap.git
Updating git://github.com/ManageIQ/rubywbem.git
Updating git://github.com/jasmine/jasmine-gem.git
Updating git://github.com/rails/rails.git
Updating git://github.com/rails/arel.git
Updating https://github.com/amatsuda/jquery-rjs.git
Updating git://github.com/rails/jquery-rails.git
Updating git://github.com/ManageIQ/ruport.git
Updating git://github.com/ManageIQ/rubyrep.git
Updating git://github.com/ManageIQ/WinRM.git
Updating git://github.com/ManageIQ/ziya.git
Updating git://github.com/tenderlove/default_value_for.git
Updating git://github.com/tenderlove/rails-i18n.git
Updating git://github.com/ManageIQ/metric_fu.git
Fetching gem metadata from https://rails-assets.org/...
Fetching version metadata from https://rails-assets.org/..
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.......................................................................
Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    railties (>= 4.2.0) ruby

    railties (= 5.0.0.alpha) ruby

    rails-i18n (>= 0) ruby depends on
      railties (~> 5.0) ruby

    railties (< 5, >= 3.0) ruby

    railties (>= 3.0) ruby
Could not find gem 'railties (~> 5.0) ruby in any of the sources

I don't know why it's printing out railties and some version specifiers so many times. I see that one of them requires railties to be < 5, but I can't figure out where that is coming from.

Here's some (possibly) relevant stuff about my environment:

[aaron@TC manageiq (rails5)]$ bundle -v
Bundler version 1.10.5
[aaron@TC manageiq (rails5)]$ ruby -v
ruby 2.3.0dev (2015-07-15 ecdh 51247) [x86_64-darwin14]
last_commit=add ecdh support
[aaron@TC manageiq (rails5)]$ gem -v
2.5.0
[aaron@TC manageiq (rails5)]$
@segiddins
Copy link
Member

I can''t bundle install given your Gemfile requires path gems that I obviously don't have installed in the same location, but I'm guessing the root cause of the error is coming from the second gem file you're eval'ing from gems/pending/Gemfile ?

@indirect
Copy link
Member

Here's a gist with a composite Gemfile, with the paths switched to use rails/rails, and the output from running DEBUG_RESOLVER=true bundle install: https://gist.github.com/indirect/77c0953e6900d44f658b

@segiddins
Copy link
Member

While I work on improving the exception message we raise, here's a different message (the default molinillo exception):

Unable to satisfy the following requirements:

- `railties (>= 4.2.0) ruby` required by `jquery-rails (4.0.4)`
- `railties (~> 5.0) ruby` required by `rails-i18n (4.0.4)`
- `railties (= 5.0.0.alpha) ruby` required by `rails (5.0.0.alpha)`
- `railties (< 5, >= 3.0) ruby` required by `codemirror-rails (4.2)`
- `railties (>= 3.0) ruby` required by `rspec-rails (2.14.2)`

@indirect
Copy link
Member

And for the record, here's the requirement that can't be satisfied:

irb(main):002:0> Gem::Requirement.new("~> 5.0").satisfied_by?(Gem::Version.new("5.0.0.alpha"))
=> false

@indirect
Copy link
Member

@tenderlove thanks for reporting this! We'll work on improving the error message when requirements can't be satisfied by the given Gemfile.

In the meantime, since your version of rails-i18n requires a version of railties that doesn't actually exist, I'm going to close this as "Bundler working correctly".

@indirect
Copy link
Member

(Oh, and note that the final line, Could not find gem 'railties (~> 5.0) ruby in any of the sources is the lowest-level error: it's not just that there was a conflict between railties = 5.0.0.alpha and railties ~> 5.0, it's that there are ultimately no versions of railties in existence that satisfy the requirement ~> 5.0.)

@segiddins
Copy link
Member

Between #3862 and CocoaPods/Molinillo#24, the error message should become a lot more helpful

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