diff --git a/config/application.rb b/config/application.rb index 61d8258e..6e2a0fe4 100644 --- a/config/application.rb +++ b/config/application.rb @@ -43,5 +43,8 @@ class Application < Rails::Application end end +# Without the following line, application will fail with Zeitwerk::NameError +Rails.autoloaders.main.ignore(Rails.root.join('app/channels/application_cable')) + Oj.default_options = { mode: :custom, cache_keys: true, cache_str: 5 } Oj.optimize_rails diff --git a/config/environments/production.rb b/config/environments/production.rb index bbf75f8e..f071483d 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -14,6 +14,13 @@ # Full error reports are disabled. config.consider_all_requests_local = false + # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment + # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). + config.require_master_key = true + + # Compress CSS using a preprocessor. + config.assets.css_compressor = :sass + # Turn on fragment caching in view templates. config.action_controller.perform_caching = true