Defect #35004


Added by Go MAEDA 6 months ago. Updated 6 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Category:Rails support
Target version:-
Resolution:Duplicate Affected version:


$ bin/rails s
=> Booting Puma
=> Rails application starting in development
=> Run `bin/rails server --help` for more startup options
DEPRECATION WARNING: Initialization autoloaded the constants ActiveRecord::Acts, ActiveRecord::Acts::Tree, Redmine::I18n, Redmine::Helpers, Redmine::Helpers::URL, Redmine::SafeAttributes, Redmine::SubclassFactory, CustomField, Redmine::Utils, Redmine::Configuration, Redmine::Scm::Adapters::CommandFailed, IssueRelation, Redmine::WikiFormatting::Macros, Redmine::Pagination, Redmine::SudoMode, ApplicationHelper, Redmine::WikiFormatting::Textile, Redmine::WikiFormatting::Textile::Formatter, Redmine::WikiFormatting::Textile::Helper, Redmine::WikiFormatting::HtmlParser, Redmine::WikiFormatting::Textile::HtmlParser, Redmine::WikiFormatting::Markdown, Redmine::WikiFormatting::Markdown::HTML, Redmine::WikiFormatting::Markdown::Formatter, Redmine::WikiFormatting::Markdown::Helper, Redmine::WikiFormatting::Markdown::HtmlParser, and Redmine::Views::ApiTemplateHandler.

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 ActiveRecord::Acts, for example,
the expected changes won't be reflected in that stale Module object.

`config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.

In order to autoload safely at boot time, please wrap your code in a reloader
callback this way:

    Rails.application.reloader.to_prepare do
      # Autoload classes and modules needed at boot time here.

That block runs when the application boots, and every time there is a reload.
For historical reasons, it may run twice, so it has to be idempotent.

Check the "Autoloading and Reloading Constants" guide to learn more about how
Rails autoloads and reloads.
 (called from <top (required)> at /path/to/redmine/config/environment.rb:16)

Related issues

Related to Redmine - Feature #29914: Migrate to Rails 6.1 New
Duplicates Redmine - Feature #32938: Rails 6: Zeitwerk support New


#1 Updated by Go MAEDA 6 months ago

#2 Updated by Pavel Rosick√Ĺ 6 months ago

refs #32938

#3 Updated by Marius BALTEANU 6 months ago

  • Duplicated by Defect #35028: Deprecation message when executing 'bundle install' added

#4 Updated by Marius BALTEANU 6 months ago

  • Duplicated by deleted (Defect #35028: Deprecation message when executing 'bundle install')

#5 Updated by Go MAEDA 6 months ago

  • Status changed from New to Closed
  • Target version deleted (5.0.0)
  • Resolution set to Duplicate

Closing as a duplicate of #32938.

#6 Updated by Go MAEDA 6 months ago

Also available in: Atom PDF