production.rb 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #---
  2. # Excerpted from "Agile Web Development with Rails",
  3. # published by The Pragmatic Bookshelf.
  4. # Copyrights apply to this code. It may not be used to create training material,
  5. # courses, books, articles, and the like. Contact us if you are in doubt.
  6. # We make no guarantees that this code is fit for any purpose.
  7. # Visit http://www.pragmaticprogrammer.com/titles/rails4 for more book information.
  8. #---
  9. Depot::Application.configure do
  10. # Settings specified here will take precedence over those in config/application.rb
  11. # Code is not reloaded between requests
  12. config.cache_classes = true
  13. # Full error reports are disabled and caching is turned on
  14. config.consider_all_requests_local = false
  15. config.action_controller.perform_caching = true
  16. # Disable Rails's static asset server (Apache or nginx will already do this)
  17. config.serve_static_assets = false
  18. # Compress JavaScripts and CSS
  19. config.assets.compress = true
  20. # Don't fallback to assets pipeline if a precompiled asset is missed
  21. config.assets.compile = false
  22. # Generate digests for assets URLs
  23. config.assets.digest = true
  24. # Defaults to Rails.root.join("public/assets")
  25. # config.assets.manifest = YOUR_PATH
  26. # Specifies the header that your server uses for sending files
  27. # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
  28. # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
  29. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  30. # config.force_ssl = true
  31. # See everything in the log (default is :info)
  32. # config.log_level = :debug
  33. # Use a different logger for distributed setups
  34. # config.logger = SyslogLogger.new
  35. # Use a different cache store in production
  36. # config.cache_store = :mem_cache_store
  37. # Enable serving of images, stylesheets, and JavaScripts from an asset server
  38. # config.action_controller.asset_host = "http://assets.example.com"
  39. # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
  40. # config.assets.precompile += %w( search.js )
  41. # Disable delivery errors, bad email addresses will be ignored
  42. # config.action_mailer.raise_delivery_errors = false
  43. # Enable threaded mode
  44. # config.threadsafe!
  45. # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  46. # the I18n.default_locale when a translation can not be found)
  47. config.i18n.fallbacks = true
  48. # Send deprecation notices to registered listeners
  49. config.active_support.deprecation = :notify
  50. end