-
-
Notifications
You must be signed in to change notification settings - Fork 911
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
Add support for Ruby 3.1 #1474
Add support for Ruby 3.1 #1474
Conversation
I believe the test failures you're seeing here are because only Rails 7.0.1 and above officially support Ruby 3.1, see: https://gist.github.com/yahonda/2776d8d7b6ea7045359f38c10449937b. 6.1 can work, but doesn't in this case (yet?), see: rails/rails#44090. |
Does adding
We are on 6.1.4, but there are some (whatever is less than patch) revisions up to 6.1.4.4. Maybe those will help? |
9da0994
to
0745f02
Compare
It will be necessary to update rubocop and fix all the offenses before continuing with this PR. Thank you so much for the help, @technicalpickles, and @aried3r! ❤️ I will work on that ASAP! |
75e444f
to
01fe2a8
Compare
Finally! 🚀 There were two problems preventing this update:
Rubocop is showing some bugs when running with Ruby 3.1:
That's why I didn't change the ruby version in the .ruby-verion and .tool- versions. I'll work on that in another PR. I think it's necessary to update rubocop. @mcmire, what do you think? |
Yeah something is definitely fishy here. I feel like it's probably been a while since we've updated Rubocop so it sounds like updating could work. |
I tried to update rubocop, but another error appeared. It looks like it won't be that simple. I will focus on creating a new release for shoulda-matchers adding support for ruby 3.1 and Rails 7. After that, I will update rubocop or create an issue in case someone else wants to make this contribution. |
I am just trying shoulda-matchers with Rails 7.0 and the workaround (given that we don't have Psych 3.x on Fedora) is:
I think that the proper solution would be to adjust the |
@voxik, nice catch! I think I'll have time to make some tests this weekend, thanks for sharing this. |
🚀