-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
I18nCache::get_i18n_cache RuntimeError in Rails 3.0.0 #1720
Comments
@mtmail Thanks for figuring this out! I've been upgrading my apps and had this error message seemingly randomly pop up during test runs, but couldn't figure out. Glad to know I'm not the only one. |
It also looks as though their Ruby 3.0 testing PR has caught this error: https://travis-ci.org/github/heartcombo/simple_form/jobs/751644453 |
I just realized that that is actually your PR, so I'm not telling you anything you don't already know 😆 |
@mtmail Could you rename the issue title to "Compatibility with Ruby 3.0.0"? For more clarity 🤝 |
@rafaelfranca @tegon @feliperenan @carlosantoniodasilva Hey guys! 👋 Happy new Year for all! 🍻 After upgrade to Ruby 3.0.0, the simple_form gem not works well anymore. It is related to a breaking change in Ruby 3, properly detailed here (for further reading):
In every form builded with simple_form, and using Ruby 3.0.0, it generates a error with this message structure:
@kylekeesling opened a PR to include ruby 3.0 in Travis CI, and the error (as expected) occured there too: PR #1721 The output of failed travis ci build is here: https://travis-ci.org/github/heartcombo/simple_form/jobs/751644453#L418 |
We don't have official support for Ruby 3 yet. I'll look into it here and in the other heartcombo projects once I come back from vacation early next year. Thanks. |
@carlosantoniodasilva Thanks for feedback! 🤝 Good vacation! 🏖️ After your return (and also the other maintainers), we could help with testing here, in our applications 🏆 🥇 |
Hi @carlosantoniodasilva , I created a fix by using a hash inside a singleton instead of the class variables: #1722 Happy to hear your thoughts when you have some time! |
@rafaelfranca @tegon @feliperenan @carlosantoniodasilva Hi! Happy new year to everyone! 🎉 Do you guys have any news about this issue? |
@WillRadi happy new year! Please see #1722 (comment), thanks. |
Environment
Current behavior
This probably comes down to
https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md
"When a class variable is overtaken by the same definition in an ancestor class/module, a RuntimeError is now raised (previously, it only issued a warning in verbose mode. Additionally, accessing a class variable from the toplevel scope is now a RuntimeError. https://bugs.ruby-lang.org/issues/14541"
where
SimpleForm::I18nCache
usesThe text was updated successfully, but these errors were encountered: