2

Provided this simple Gemfile:

source 'http://rubygems.org'
gem 'rails',                    '~> 4.1.0'
gem 'comfortable_mexican_sofa', '~> 1.12.3'

It stupidly fails with this:

Bundler could not find compatible versions for gem "i18n":
  In Gemfile:
    comfortable_mexican_sofa (~> 1.12.3) ruby depends on
      jquery-rails (>= 3.0.0) ruby depends on
        railties (< 5.0, >= 4.2.0.beta) ruby depends on
          activesupport (= 4.2.0.beta1) ruby depends on
            i18n (< 0.8, >= 0.7.0.beta1) ruby

    comfortable_mexican_sofa (~> 1.12.3) ruby depends on
      rails-i18n (>= 4.0.0) ruby depends on
        i18n (0.6.0)

Bundler could not find compatible versions for gem "rails":
  In Gemfile:
    comfortable_mexican_sofa (~> 1.12.3) ruby depends on
      rails-i18n (>= 4.0.0) ruby depends on
        rails (~> 4.0.0) ruby

    rails (4.1.0)

I see the problem. CMS has dependency on jquery-rails (>= 3.0.0). Few days ago that gem got bumped to 4.0.0 and it set Rails dependency to >= 4.2.0.beta. This messes everything up obviously.

What doesn't make sense to me is the fact that I specifically defined Rails to be ~> 4.1.0. Why does a sub-dependency completely ignore this and tries to install version that doesn't fit?

I can solve this by restricting jquery-rails (< 4.0.0) but I'd prefer not to do that.

NM Pennypacker
  • 6,704
  • 11
  • 36
  • 38
Grocery
  • 2,244
  • 16
  • 26

0 Answers0