eager load と hot reload を混合していたのでまとめる。
Definitions
-
eager loading
- = load all files when booting up a Rails server.
- Configured with
config.eager_load = true
-
reloading
(= hot reloading)- = reflect the code changes immediately to a runninng Rails server before processing the next request.
- Configured with
config.cache_classes = false
To reflect code changes in rails console, hit relaod!
in the console.
Default configurations in Rails 7.0.4
development | test | production | |
---|---|---|---|
config.eager_load |
false |
ENV["CI"].present? |
true (do eager loading) |
config.cache_classes |
false (do hot reloading) |
true |
true |