Skip to content

Commit

Permalink
Merge branch 'fixProductionRails4'
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Clark committed Aug 30, 2015
2 parents c6a96ce + 282ea33 commit f168635
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
19 changes: 14 additions & 5 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
config.consider_all_requests_local = false
config.action_controller.perform_caching = true

# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?

# Compress JavaScripts and CSS
config.assets.compress = true
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass

# Specifies the header that your server uses for sending files
# (comment out if your front-end server doesn't support this)
Expand All @@ -25,7 +27,14 @@
# config.force_ssl = true

# See everything in the log (default is :info)
# config.log_level = :debug
config.log_level = :info

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false

# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true

# Use a different logger for distributed setups
# config.logger = SyslogLogger.new
Expand Down
11 changes: 11 additions & 0 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Be sure to restart your server when you modify this file.

# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0'

# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path

# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js )

0 comments on commit f168635

Please sign in to comment.