Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 7.03 KB | None | 0 0
  1. environments/production.erb
  2.  
  3. Rails.application.configure do
  4.   # Settings specified here will take precedence over those in config/application.rb.
  5.  
  6.   # Code is not reloaded between requests.
  7.   config.cache_classes = true
  8.  
  9.   # Eager load code on boot. This eager loads most of Rails and
  10.   # your application in memory, allowing both threaded web servers
  11.   # and those relying on copy on write to perform better.
  12.   # Rake tasks automatically ignore this option for performance.
  13.   config.eager_load = true
  14.  
  15.   # Full error reports are disabled and caching is turned on.
  16.   config.consider_all_requests_local       = false
  17.   config.action_controller.perform_caching = true
  18.  
  19.   # Enable Rack::Cache to put a simple HTTP cache in front of your application
  20.   # Add `rack-cache` to your Gemfile before enabling this.
  21.   # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
  22.   # config.action_dispatch.rack_cache = true
  23.  
  24.   # Disable Rails's static asset server (Apache or nginx will already do this).
  25.   config.serve_static_assets = true
  26.  
  27.   # Compress JavaScripts and CSS.
  28.   config.assets.js_compressor = :uglifier
  29.   # config.assets.css_compressor = :sass
  30.  
  31.   # Do not fallback to assets pipeline if a precompiled asset is missed.
  32.   config.assets.compile = true
  33.  
  34.   #Fix CKEditor
  35.   config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
  36.   config.assets.precompile += Ckeditor.assets
  37.   config.assets.precompile += %w(ckeditor/*)
  38.  
  39.   # Generate digests for assets URLs.
  40.   config.assets.digest = true
  41.  
  42.   # `config.assets.precompile` has moved to config/initializers/assets.rb
  43.  
  44.   # Specifies the header that your server uses for sending files.
  45.   # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
  46.   # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
  47.  
  48.   # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  49.   # config.force_ssl = true
  50.  
  51.   # Set to :debug to see everything in the log.
  52.   config.log_level = :info
  53.  
  54.   # Prepend all log lines with the following tags.
  55.   # config.log_tags = [ :subdomain, :uuid ]
  56.  
  57.   # Use a different logger for distributed setups.
  58.   # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
  59.  
  60.   # Use a different cache store in production.
  61.   # config.cache_store = :mem_cache_store
  62.  
  63.   # Enable serving of images, stylesheets, and JavaScripts from an asset server.
  64.   # config.action_controller.asset_host = "http://assets.example.com"
  65.  
  66.   # Precompile additional assets.
  67.   # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
  68.   # config.assets.precompile += %w( search.js )
  69.  
  70.   # Ignore bad email addresses and do not raise email delivery errors.
  71.   # Set this to true and configure the email server for immediate delivery to raise delivery errors.
  72.   # config.action_mailer.raise_delivery_errors = false
  73.  
  74.   # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  75.   # the I18n.default_locale when a translation cannot be found).
  76.   config.i18n.fallbacks = true
  77.  
  78.   # Send deprecation notices to registered listeners.
  79.   config.active_support.deprecation = :notify
  80.  
  81.   # Disable automatic flushing of the log to improve performance.
  82.   # config.autoflush_log = false
  83.  
  84.   # Use default logging formatter so that PID and timestamp are not suppressed.
  85.   config.log_formatter = ::Logger::Formatter.new
  86.  
  87.   # Do not dump schema after migrations.
  88.   config.active_record.dump_schema_after_migration = false
  89. end
  90.  
  91.  
  92.  
  93. Rake task:
  94.  
  95. Rails.application.configure do
  96.   # Settings specified here will take precedence over those in config/application.rb.
  97.  
  98.   # Code is not reloaded between requests.
  99.   config.cache_classes = true
  100.  
  101.   # Eager load code on boot. This eager loads most of Rails and
  102.   # your application in memory, allowing both threaded web servers
  103.   # and those relying on copy on write to perform better.
  104.   # Rake tasks automatically ignore this option for performance.
  105.   config.eager_load = true
  106.  
  107.   # Full error reports are disabled and caching is turned on.
  108.   config.consider_all_requests_local       = false
  109.   config.action_controller.perform_caching = true
  110.  
  111.   # Enable Rack::Cache to put a simple HTTP cache in front of your application
  112.   # Add `rack-cache` to your Gemfile before enabling this.
  113.   # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
  114.   # config.action_dispatch.rack_cache = true
  115.  
  116.   # Disable Rails's static asset server (Apache or nginx will already do this).
  117.   config.serve_static_assets = true
  118.  
  119.   # Compress JavaScripts and CSS.
  120.   config.assets.js_compressor = :uglifier
  121.   # config.assets.css_compressor = :sass
  122.  
  123.   # Do not fallback to assets pipeline if a precompiled asset is missed.
  124.   config.assets.compile = true
  125.  
  126.   #Fix CKEditor
  127.   config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
  128.   config.assets.precompile += Ckeditor.assets
  129.   config.assets.precompile += %w(ckeditor/*)
  130.  
  131.   # Generate digests for assets URLs.
  132.   config.assets.digest = true
  133.  
  134.   # `config.assets.precompile` has moved to config/initializers/assets.rb
  135.  
  136.   # Specifies the header that your server uses for sending files.
  137.   # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
  138.   # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
  139.  
  140.   # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  141.   # config.force_ssl = true
  142.  
  143.   # Set to :debug to see everything in the log.
  144.   config.log_level = :info
  145.  
  146.   # Prepend all log lines with the following tags.
  147.   # config.log_tags = [ :subdomain, :uuid ]
  148.  
  149.   # Use a different logger for distributed setups.
  150.   # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
  151.  
  152.   # Use a different cache store in production.
  153.   # config.cache_store = :mem_cache_store
  154.  
  155.   # Enable serving of images, stylesheets, and JavaScripts from an asset server.
  156.   # config.action_controller.asset_host = "http://assets.example.com"
  157.  
  158.   # Precompile additional assets.
  159.   # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
  160.   # config.assets.precompile += %w( search.js )
  161.  
  162.   # Ignore bad email addresses and do not raise email delivery errors.
  163.   # Set this to true and configure the email server for immediate delivery to raise delivery errors.
  164.   # config.action_mailer.raise_delivery_errors = false
  165.  
  166.   # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  167.   # the I18n.default_locale when a translation cannot be found).
  168.   config.i18n.fallbacks = true
  169.  
  170.   # Send deprecation notices to registered listeners.
  171.   config.active_support.deprecation = :notify
  172.  
  173.   # Disable automatic flushing of the log to improve performance.
  174.   # config.autoflush_log = false
  175.  
  176.   # Use default logging formatter so that PID and timestamp are not suppressed.
  177.   config.log_formatter = ::Logger::Formatter.new
  178.  
  179.   # Do not dump schema after migrations.
  180.   config.active_record.dump_schema_after_migration = false
  181. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement