Rails Assets custom manifests are not precompiling

被刻印的时光 ゝ 提交于 2019-12-11 14:07:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!