In 472 there was a change on the way the rake tasks detects and use's Rails autoloader, by using
Rails.application.config.autoloader method call. This works
perfectly for projects with Rails version < 7. In Rails 7 projects this
method call fails as it seems that Rails.application.config.autoloader
is deprecated. Zeitwerk is the only autoloader available and is not
configurable anymore.
As per rails guides, there is a way to detect whether
Zeitwerk autoloader is enabled, by using the predicate
Rails.autoloaders.zeitwerk_enabled? which is still present at Rails 7.
In 472 there was a change on the way the rake tasks detects and use's Rails autoloader, by using
Rails.application.config.autoloader
method call. This works perfectly for projects with Rails version < 7. In Rails 7 projects this method call fails as it seems that Rails.application.config.autoloader is deprecated. Zeitwerk is the only autoloader available and is not configurable anymore. As per rails guides, there is a way to detect whether Zeitwerk autoloader is enabled, by using the predicateRails.autoloaders.zeitwerk_enabled?
which is still present at Rails 7.