Skip to content

Cannot lock bundler version to <2 #3323

@thedanbob

Description

@thedanbob

I have rails projects that cannot be updated to bundler 2 yet because the servers still have bundler 1. According to the docs, the Gemfile.lock is only updated to use bundler 2 if you run bundle update --bundler. However, my Gemfile.lock is getting updated to bundler 2.0.1 when I run just bundle update. If I try to set the version of bundler in the Gemfile with gem 'bundler', '< 2' I get the error

Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    bundler (< 2)

  Current Bundler version:
    bundler (2.0.1)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?

Could not find gem 'bundler (< 2)' in any of the relevant sources:
  the local ruby installation

I have both bundler 2.0.1 and 1.17.3 installed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions