Skip to content

Commit

Permalink
Merge pull request #2357 from texpert/fix-rails-8-release
Browse files Browse the repository at this point in the history
Fix Rails 8 release on production
  • Loading branch information
texpert authored Dec 8, 2024
2 parents b1ad350 + 8469c91 commit 1ea7a94
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1ea7a94

Please sign in to comment.