sass - Rails Assets precompile is too slow ~12hrs -


i local precompile assets like this rails_env=production bundle exec rake assets:precompile, it's slows 12hrs. don't know happen! , don't know how start something. when make changes in stylesheet files, these delay around 10s

please can me, thanks!

this applications.css.scss

@import "_font-awesome"; @import "jquery.ui.core"; @import "jquery.ui.theme"; @import "datatables/src/demo_table_jui"; @import "token-input-facebook"; @import "fullcalendar"; @import "fullcalendar.print";  @import "bootstrap"; @import "bootstrap-multiselect"; @import "bootstrap-datetimepicker";  @import "header"; @import "sub_header"; @import "students"; @import "people"; @import "institutions"; 

my gemfile:

gem 'sass-rails', '>= 3.2' gem 'bootstrap-sass', '~> 3.0.3.0' 

its versions:

bootstrap-sass (3.0.3.0) sass (3.2.12) sass-rails (3.2.6) 

additional info:

rails 3.2.16 ruby 1.9.3 

update1

my complete gemfile

update2

when put disable assets compress config.assets.compress = false,in production mode, results:

real    5m13.113s user    5m5.355s sys     0m5.268s 

update3

got improvement not solution.

  • i change css_compresor, i'm using :yui.
  • i change application.css.scss in favor use sprockets require directives.

now application.css.scss file.

the time precompile it's : ~24min

i solved problem:

the problem use of @extend sentence in .scss files. problem appear in sass version.

i wanted more semantic html files(read here more information it).

i found problem making introspection sprockets precompile. this great tutorial

the solution take off @extend sentences scss files , use plain bootstrap in html.

example: had change this.

# main.html <div class='user-information'> ... </div> 
# main.scss .user-information {   @extend .col-md-12 } 

by this:

# main.html <div class='col-md-12'> ... </div> 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -