开发者

Why is Asset Pipeline trying to compress my CSS twice (or not compressing at all)?

开发者 https://www.devze.com 2023-04-11 13:04 出处:网络
After upgrading our Compass-powered app to Rails 3.1.1.rc1 and Asset Pipeline, I\'ve started getting \"regexp buffer overflow\" error when trying to precompile stylesheets locally. I\'ve discovered th

After upgrading our Compass-powered app to Rails 3.1.1.rc1 and Asset Pipeline, I've started getting "regexp buffer overflow" error when trying to precompile stylesheets locally. I've discovered that ScssCompressor w开发者_如何学JAVAas receiving already precompiled stylesheet and thus failing on a more complex regexp (presumably compiled by Compass).

To prevent this behavior, I disabled Scss compression and I observed stylesheets getting compressed in precompile step. (I've explained this in more details on sass-rails Github Issue #63).

However, when I deployed the app to our staging server using the provided Capistrano deploy/assets recipe I noticed that stylesheets now don't get compressed at all (they are precompiled correctly though).

Any ideas as to how to fix this or where to look for help would be appreciated.

Bundle:

  • rails 3.1.1.rc1 (rc2 has other problems)
  • compass master branch (0.12.alpha has other problems)
  • sass-rails 3.1.4
  • sprockets 2.0.2

UPDATE: to answer the second part of the question: Compass was not configured to compress stylesheets for staging environment (default is just for production), so there is no difference in the flow itself.


because sprockets wants to have compressions as a separate step. Perhaps there's some optimizations. please file a bug against sass-rails and we'll investigate.

0

精彩评论

暂无评论...
验证码 换一张
取 消