Closed chhtz closed 10 months ago
Another temporary soluition is to put
Autoproj.config.set "bundler_version", "2.4.22"
in autoproj/init.rb, which ensures that everyone that use your buildconf gets the fix.
Does it make sense to add some logic to the determination of the default bundler version, to account for the new version constraints?
Untested example:
def self.default_bundler_version
ruby_version = Gem::Version.new(RUBY_VERSION)
if ruby_version >= Gem::Version.new("3.0.0")
# most recent version should work
return
elsif ruby_version >= Gem::Version.new("2.6.0")
# bundler 2.5+ requires ruby 3.0 or higher
return "2.4.22"
else
# bundler 2.4+ requires ruby 2.6 or higher
return "2.3.27"
end
end
btw, does it work to leave out the patch part of the version spec here, to default to the most recent patch for a specific minor version, e.g., return 2.3 instead of 2.3.27 (was 2.3.6 before) ? Might specify the requirement with ~>
. Not sure if it breaks anything though...
As of version 2.5, bundler requires Ruby version 3.0, which is not (easily) available on some systems. Therefore bootstraps will fail. You can work-around this by adding the following line to your config_seed.yml (if you use that):
But maybe there is a more elegant solution (also not fixing the bundler version for users who use Ruby 3 already).