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.
I have been running into a strange situation which I believe is due to differing versions of the built-in gem
setin 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-browserswhich appears to useset:1.0.3However my devops team is running my application on Docker, usingruby:3.0.6alpine3.16which appears to useset:1.0.1Whichever of those versions I specify in
Gemfile.lockwill cause an error similar to this: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.