diff options
author | elijah <elijah@riseup.net> | 2013-11-15 00:25:40 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-11-15 00:25:40 -0800 |
commit | 4193a94b4cc5b5cabbace8311562c0ca88a79f74 (patch) | |
tree | 53987602acce776e6a1b10dbd7b9978598cafcc9 | |
parent | 84682ee6261967935d16fbeae1190af26420563e (diff) |
fix problem with custom scss files and precompiling assets in production mode.
-rw-r--r-- | config/application.rb | 2 | ||||
-rw-r--r-- | config/initializers/customization.rb | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/config/application.rb b/config/application.rb index 8cf7e30..2c9c55a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -78,7 +78,7 @@ module LeapWeb # Enable the asset pipeline config.assets.enabled = true - config.assets.initialize_on_precompile = false + config.assets.initialize_on_precompile = true # don't change this (see customization.rb) # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' diff --git a/config/initializers/customization.rb b/config/initializers/customization.rb index 08da518..bc9c834 100644 --- a/config/initializers/customization.rb +++ b/config/initializers/customization.rb @@ -12,8 +12,13 @@ customization_directory = "#{Rails.root}/config/customization" # # Set customization stylesheets as the first asset path # -# (This cannot go in application.rb, because the default paths -# haven't been loaded yet, as far as I can tell) +# Some notes: +# +# * This cannot go in application.rb, as far as I can tell. In application.rb, the default paths +# haven't been loaded yet, so the path we add will always end up at the end unless we add it here. +# +# * For this to work, config.assets.initialize_on_precompile MUST be set to true, otherwise +# this initializer will never get called in production mode when the assets are precompiled. # Rails.application.config.assets.paths.unshift "#{customization_directory}/stylesheets" |