From f82737a7d4702968cfb41ab426c42888b52dc9f9 Mon Sep 17 00:00:00 2001 From: Ralf Teusner Date: Mon, 19 Dec 2016 15:08:51 +0100 Subject: [PATCH] some small changes to staging environment (no caching and eager loading, some more errors). --- config/environments/staging.rb | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/config/environments/staging.rb b/config/environments/staging.rb index dfe8cefb..ca1a98bb 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -1,14 +1,17 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - # Code is not reloaded between requests. - config.cache_classes = true + # true: Code is not reloaded between requests. + # false: In the development environment your application's code is reloaded on + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false - # Eager load code on boot. This eager loads most of Rails and - # your application in memory, allowing both threaded web servers - # and those relying on copy on write to perform better. - # Rake tasks automatically ignore this option for performance. - config.eager_load = true + # true: Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = false #enable web console in staging config.web_console.development_only = false @@ -17,6 +20,17 @@ Rails.application.configure do config.consider_all_requests_local = true config.action_controller.perform_caching = false + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Adds additional error checking when serving assets at runtime. + # Checks for improperly declared sprockets dependencies. + # Raises helpful error messages. + config.assets.raise_runtime_errors = true + + # Raise errors for missing translations. + config.action_view.raise_on_missing_translations = true + # Enable Rack::Cache to put a simple HTTP cache in front of your application # Add `rack-cache` to your Gemfile before enabling this. # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.