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

Require applications to have reloading enabled in the managed environ… #652

Merged
merged 1 commit into from
Sep 8, 2021

Conversation

fxn
Copy link
Member

@fxn fxn commented Sep 8, 2021

Spring changes application configuration on the fly. This has several issues:

  1. ActiveSupport::Dependencies.mechanism= is a private setter. The public interface to enable reloading in Rails applications is config.cache_classes, set in config/environments/*.rb.
  2. ActiveSupport::Dependencies.mechanism= does not even exist in Rails 7.

In this patch we document reloading has to be enabled, and check the setting in an inititalizer.

Note that Rails 6.x applications that were generated with Spring enabled (the default), already had config.cache_classes = false generated in config/environments/test.rb (commit).

Fixes #649.

@fxn fxn merged commit eff7850 into master Sep 8, 2021
@fxn fxn deleted the rm-mechanism branch September 8, 2021 13:39
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 this pull request may close these issues.

Spring uses AS::Dependencies.mechanism=
1 participant