Rails sass 3.3 saving cache error [solved]

zjlovezj · April 03, 2014 · Last by zjlovezj replied at April 17, 2014 · 3224 hits

我的 rails 项目,使用了 sass 3.3.4 sprockets 2.11.0

每次更改了 sass 文件,刷新页面都超级慢。 错误日志如下:

Warning. Error encountered while saving cache 6ca30caaf30363bc4dd47daa391e05e43fd49a39/home.css.scssc: can't dump anonymous class #Class:0x000001011634b8

https://github.com/sstephenson/sprockets/issues/507 https://github.com/nex3/sass/issues/1190 https://github.com/nex3/sass/issues/1028

问题好像没有解决。 但是,这个问题超级影响开发效率。 大家有什么好办法吗?

文件命名?home.scc.scssc 还是 home.css.scss

我的源文件命名是.scss 可能上因为我开启了 source maps,所以会保存.scssc 的文件。 但是保存失败了,所以没有都要重新编译,刷新页面很慢。

目前添加, gem 'sprockets-sass', '1.1.0'

终于不出现这个错误了,更改 scss 文件后,刷新速度正常了

感兴趣的可以看看这个 issue。 https://github.com/petebrowne/sprockets-sass/issues/26

You need to Sign in before reply, if you don't have an account, please Sign up first.