Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Ruby 3.3.0-rc1 to fix mysql_ar_rspec #32

Merged

Conversation

HeyNonster
Copy link
Contributor

@HeyNonster HeyNonster commented Dec 14, 2023

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)

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 installs timeout to >= 0.4.0 by default or run gem install --default timeout -v 0.4.1.

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)
```

Ruby 3.3.0 bumps the [default timeout version to 0.4.0](https://stdgems.org/default_gems.json) though so we can use Ruby 3.3.0 to fix ci.

Locally, we need to wait for a new `rubygems` version that installs
`timeout` to `>= 0.4.0` by default _or_ run `gem install --default timeout -v 0.4.1`.
@guilleiguaran guilleiguaran merged commit 32a941e into testcontainers:main Dec 16, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants