Skip to content

Rails 6 - Deprecation warning regarding Autoloading #1280

@pabse

Description

@pabse

This issue is a (choose one):

  • Problem/bug report.
  • Feature request.
  • Request for support. Note: Please try to avoid submitting issues for support requests. Use Gitter instead.

Checklist before submitting:

  • I've searched for an existing issue.

Description

Bug reports:

When I add the gem to my Gemfile in may Rails 6 App, I'm getting the following deprecation warning:

ActiveSupport::DeprecationException: 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.

The text is a bit misleading, but the issue is definitely coming from this gem. You can see this issue here: rails/rails#36546 that the error has nothing to do with ActionText.
If I remove the gem, the warning disappears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions