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

Appraisal specs fail with cannot load such file -- mutex_m #2736

Closed
edwardloveall opened this issue Jan 1, 2025 · 7 comments · Fixed by #2739
Closed

Appraisal specs fail with cannot load such file -- mutex_m #2736

edwardloveall opened this issue Jan 1, 2025 · 7 comments · Fixed by #2739
Labels
bug breakages in functionality that is implemented

Comments

@edwardloveall
Copy link

What were you trying to do?

Test the gem using appraisal via the contributing guidelines. I:

  • ran bin/setup
  • configured by database.yml
  • ran bundle exec rspec && bundle exec appraisal rspec

What did you end up with (logs, or, even better, example apps are great!)?

The rspec tests ran fine, but then appraisal tried to run specs with rails60.gemfile and I got this error:

An error occurred while loading ./spec/administrate/namespace_spec.rb. - Did you mean?
                    rspec ./spec/administrate/page/base_spec.rb

Failure/Error: require "active_model/railtie"

LoadError:
  cannot load such file -- mutex_m
# ./spec/example_app/config/application.rb:3:in '<top (required)>'
# ./spec/example_app/config/environment.rb:2:in 'Kernel#require_relative'
# ./spec/example_app/config/environment.rb:2:in '<top (required)>'
# ./spec/rails_helper.rb:5:in '<top (required)>'
# ./spec/administrate/namespace_spec.rb:1:in '<top (required)>'

I did check and the mutex_m gem does seem to be installed.

What versions are you running?

administrate: d5c3c56

@edwardloveall edwardloveall added the bug breakages in functionality that is implemented label Jan 1, 2025
@nickcharlton
Copy link
Member

Oh, it's failing on the Rails 6.0 one too. That makes sense.

@nickcharlton
Copy link
Member

@edwardloveall, could you try out #2739 and see if that fixes it for you?

nickcharlton added a commit that referenced this issue Jan 2, 2025
@edwardloveall
Copy link
Author

It does fix it! I get new errors, but I could open new issues for those. In brief, I get one of these up top:

Failure/Error: ActiveRecord::Migration.maintain_test_schema!

Psych::AliasesNotEnabled:
  Cannot load database configuration:
  Alias parsing was not enabled. To enable it, pass `aliases: true` to `Psych::load` or `Psych::safe_load`.
# ./spec/rails_helper.rb:32:in '<top (required)>'
# ./spec/administrate/namespace_spec.rb:1:in '<top (required)>'

and then many of these after:

An error occurred while loading ./spec/administrate/page/base_spec.rb.
Failure/Error: ActiveRecord::Migration.maintain_test_schema!

NoMethodError:
  undefined method 'delete' for nil
# ./spec/rails_helper.rb:32:in '<top (required)>'
# ./spec/administrate/page/base_spec.rb:1:in '<top (required)>'

@nickcharlton
Copy link
Member

Thanks, that's helpful!

I've seen at least one of these when running locally in the past, but not in CI. I'm not sure if that's CI not being reflective, or something locally. But I've trusted CI to be more correct. That assumption might be wrong!

I'm loath to spent too much time, but I've been trying to avoid officially dropping Rails 6.0/6.1 support until v1 is released.

@nickcharlton
Copy link
Member

It turns out that the first error was key — at least when running on Ruby 3.2.5. I've opened #2740 for that.

I'm now able to run all the Appraisals, which is great. I'm not sure about why CI isn't failing though.

@edwardloveall
Copy link
Author

Nice! That does get rid of the Psych error. I still get many cannot load such file -- mutex_m though.

No rush or anything on this, btw. Thank you for looking into it.

@nickcharlton
Copy link
Member

Yeah, we need both of #2739 and #2740. Hopefully that resolves it completely locally. If not, we can re-open this issue.

I plan to drop Rails 6.0 (and probably 6.1) support after v1 is out, so hopefully that's it for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug breakages in functionality that is implemented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants