Skip to content

Bundler should give a better error when the Gemfile itself activates a conflicting gem #7178

Description

@Bandes

I have been running into a strange situation which I believe is due to differing versions of the built-in gem set in different docker images.

My application runs on ruby 3.0.6 currently. My CI is CircleCI, and I use the cimg/ruby:3.0.6-browsers which appears to use set:1.0.3 However my devops team is running my application on Docker, using ruby:3.0.6alpine3.16 which appears to use set:1.0.1

Whichever of those versions I specify in Gemfile.lock will cause an error similar to this:

`check_for_activated_spec!': You have already activated set 1.0.1, but your Gemfile requires set 1.0.3. Since set is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports set as a default gem. (Gem::LoadError)

Similar things have happened to me on other projects that use more up-to-date versions of ruby.

I would have expected that bundler would be able to force the use of the version of the gem in Gemfile.lock, it hadn't occurred to me that I would need to inspect which versions were built-in to my images.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions