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

Deprecation Warning in Rails 6 initialization #276

Closed
ryanb opened this issue Mar 17, 2020 · 2 comments · Fixed by #277
Closed

Deprecation Warning in Rails 6 initialization #276

ryanb opened this issue Mar 17, 2020 · 2 comments · Fixed by #277
Assignees

Comments

@ryanb
Copy link
Contributor

ryanb commented Mar 17, 2020

When starting a Rails 6 app with the localeapp gem we get this warning:

DEPRECATION WARNING: Initialization autoloaded the constants ActionText::ContentHelper and ActionText::TagHelper

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload ActionText::ContentHelper, for example,
the expected changes won't be reflected in that stale Module object.

These autoloaded constants have been unloaded.

Please, check the "Autoloading and Reloading Constants" guide for solutions.
 (called from <top (required)> at /Users/rbates/code/envisage/config/environment.rb:5)

This is because localeapp calls ActionController::Base in an initializer. See rails/rails#36546 for details.

To fix this you can wrap calls to ActionController::Base in ActiveSupport.on_load(:action_controller) do block.

@thibaultdalban
Copy link
Member

Hi @ryanb 👋,

Thank you for your feedback and for providing the solution as well 👍
We added this issue to the roadmap, so it should be fixed very soon!

@thibaultdalban
Copy link
Member

Hello @ryanb,

A new version has been released 🚀
https://rubygems.org/gems/localeapp/versions/3.1.3

Thank you for reporting this issue 👍

Happy Translating 🌐

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 a pull request may close this issue.

2 participants