Don't eager load active storage in production

We don't use active storage, but eager loading it tries to read the
config/storage.yml, which doesn't exist, because we don't need it.

571b4d5fb9/activestorage/lib/active_storage/engine.rb (L137)
571b4d5fb9/activestorage/app/models/active_storage/blob.rb (L354)

closes #8371
This commit is contained in:
Benjamin Neff 2022-07-21 03:33:08 +02:00
parent 2e3bd14a09
commit ee68da7eeb
No known key found for this signature in database
GPG key ID: 971464C3F1A90194

View file

@ -15,6 +15,11 @@ Rails.application.configure do
config.eager_load = true
config.eager_load_paths += %W[#{config.root}/lib]
# diaspora* does not use ActiveStroage. But eager loading then loads active_storage/blob.rb,
# which then fails if there isn't a config/storage.yml
# This can be removed if we ever want to use ActiveStorage and a storage.yml exists
config.eager_load_namespaces.delete(ActiveStorage::Engine)
# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.action_controller.perform_caching = true