问题
I have a scenario as follows. I've built a "themed" site using the asset pipeline. There are a variety of manifests:
application.scss
application_light.scss
application_dark.scss
When I run rake assets:precompile
, only application.scss gets compiled and created as application.css.
I have no trouble with these assets in development, it is only in production pre-compilation that they fail.
I have tried:
config.assets.precompile += %w( application_light.scss )
This also does not work, it simply does not precompile anything past application.scss
回答1:
I found the answer here:
Precompiling a .scss manifest file using Rails 3.1's asset pipeline
Turns out I just needed to change the precompile to css from scss.
来源:https://stackoverflow.com/questions/12078963/rails-assets-custom-manifests-are-not-precompiling