Asset pipeline not precompiling sass

僤鯓⒐⒋嵵緔 提交于 2019-12-20 04:15:20

问题


I've updated my app to use the rails 3.1 asset pipeline (I think). I can compile .css files but not css.scss. I am running the sass-rails gem but nothing seems to work.

What should I check? Sorry, I don't know exactly what info I should supply here to help debug. I can edit this...

EDITS:

My .scss file contains:

/*
*= require_self
*= require_tree . 
*/

edit: see Sprockets::CircularDependencyError in Store#index

Thanks, Rim


回答1:


Remember that css.scss files need to be included, not imported like the rest:

So: Turn you application.css into an application.css.scss, and do like this in it:

/*
*= require ./normal/custom.css
*= require_self
*/

@import "normal/design/control_panel";


来源:https://stackoverflow.com/questions/8803226/asset-pipeline-not-precompiling-sass

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