In Ruby < 3.3.0 the default timeout gem version is 0.3.1. ActiveRecord >= 7.1 requires timeout >= 0.4.0. This causes a problem with inline gemfiles because rubygems loads timeout 0.3.1 then ActiveRecord tries to require timeout 0.4.1, but timeout is already loaded and we end up with this error:
runtime.rb:304:in `check_for_activated_spec!': You have already activated timeout 0.3.1, but your
Gemfile requires timeout 0.4.1. Since timeout is a default gem, you can either remove your
dependency on it or try updating to a newer version of bundler that supports timeout as a default
gem. (Gem::LoadError)
In Ruby < 3.3.0 the default
timeout
gem version is0.3.1
.ActiveRecord >= 7.1
requirestimeout >= 0.4.0
. This causes a problem with inline gemfiles becauserubygems
loadstimeout 0.3.1
thenActiveRecord
tries to requiretimeout 0.4.1,
but timeout is already loaded and we end up with this error:Ruby 3.3.0 bumps the default timeout version to 0.4.0 though, so we can use Ruby 3.3.0 to fix ci.
Locally, we need to wait for a new
rubygems
version that installstimeout
to>= 0.4.0
by default or rungem install --default timeout -v 0.4.1
.