使用Sass-Bootstrap和Rails 4编译真的很慢

时间:2015-05-18 20:44:27

标签: twitter-bootstrap ruby-on-rails-4 sass precompile

我是Rails的新手,我使用sass-bootstrap gem在我的Rails项目中使用bootstrap。一切都加载速度相当快,但现在每次更改任何scss文件时,预编译时间最多需要90秒才能完成。

在application.css.scss中,我在顶部导入bootstrap并根据其他建议要求partials,并将config.assets.debug设置为false;

这是我的application.css.scss

@import "bootstrap";

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any styles
 * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
 * file per style scope.
 *
*= require _static_pages
*= require_tree .
*= require_self
 */

还有什么我可能做得不对,导致如此痛苦的加载时间? 我已经看到其他类似的问题类似,但似乎没有一个适合我的Bootstrap情况或提供有效的答案。

0 个答案:

没有答案