Jet Blue
Jet Blue

Reputation: 5281

Bundler could not find compatible version of gem despite it being there?

I don't understand this error I receive when I run bundle install:

Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    rails (= 3.0.0) was resolved to 3.0.0, which depends on
      bundler (~> 1.0.0)

  Current Bundler version:
    bundler (1.16.2)
This Gemfile requires a different version of Bundler.

If I have bundler version 1.16.2, why is it not considered to meet the ~> 1.0.0 criteria?

Upvotes: 1

Views: 262

Answers (1)

engineersmnky
engineersmnky

Reputation: 29308

The ~> notation allows for the delineation of the incrementation whereby the least significant digit is allowed to differ from the specification.

So in this case ~> 1.0.0 means any version that is >= 1.0.0 and < 1.1.

However a notation of ~> 1.0 would mean any version >= 1.0 and < 2.0

In your case 1.16.2 is clearly greater than 1.1 and thus fails the requirement set forth

Upvotes: 2

Related Questions