DEPRECATION WARNING: Initialization autoloaded the constants AuthHelper, SemanticFormHelper, ActionText::ContentHelper, and ActionText::TagHelper
Since upgrading to Rails 6 I have been getting this warning relating to the new Zeitwerk autoloader.
Often this is caused by loading constants in the config/initializers folder, but that is not the case here.
AuthHelper and SemanticFormHelper are pulled in by these 2 files I have in my lib folder:
module AuthorizationSystem
include AuthHelper
...
end
module SemanticFormBuilder
include SemanticFormHelper
...
end
On initialization all the files in the lib folder are run, and anything included in those files trigger the DEPRECATION WARNING.
If I remove the include statements the warnings go away but then the app breaks on certain pages because the includes are necessary.
How can I have include statements in files in my lib folder without causing the warning?
ActionText::ContentHelper and ActionText::TagHelper are nowhere to be found in my app, so I imagine those warnings are coming from a gem I am using. Any ideas on how to debug that would also be greatly appreciated.