A
A
Alexander N++2016-04-01 19:14:51
css
Alexander N++, 2016-04-01 19:14:51

Compass sass how to properly generate sprites?

config.rb

require 'compass/import-once/activate'
http_path = "/"
  css_dir = "css"
  sass_dir = "sass"
  images_dir = "img"
  javascripts_dir = "js"

  output_style = :expanded
  relative_assets = true
  line_comments = false

start compass wake .
all OK
@import "compass/utilities/sprites";   // подключаем плагин
$menu-spacing: 10px;                         // отступы в спрайтах
@import "menu/*.png";                       // собрать спрайт
@include all-menu-sprites;                // подключить

at compile time
/*
Error: File to import not found or unreadable: compass/utilities/sprites.
        on line 1 of screen.scss

1: @import "compass/utilities/sprites";
2: $menu-spacing: 10px;
3: @import "menu/*.png";
4: @include all-menu-sprites;

Backtrace:
screen.scss:1
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/import_node.rb:67:in `rescue in import'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/import_node.rb:45:in `import'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/import_node.rb:28:in `imported_file'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/import_node.rb:37:in `css_import?'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/perform.rb:311:in `visit_import'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/base.rb:36:in `visit'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/stack.rb:79:in `block in with_base'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/stack.rb:115:in `with_frame'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/stack.rb:79:in `with_base'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/perform.rb:158:in `visit'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/base.rb:52:in `map'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/base.rb:52:in `visit_children'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/perform.rb:179:in `with_environment'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/perform.rb:166:in `visit_children'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/base.rb:36:in `block in visit'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/perform.rb:186:in `visit_root'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/base.rb:36:in `visit'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/perform.rb:157:in `visit'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/visitors/perform.rb:8:in `visit'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/root_node.rb:36:in `css_tree'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/tree/root_node.rb:29:in `render_with_sourcemap'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/engine.rb:368:in `_render_with_sourcemap'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/engine.rb:285:in `render_with_sourcemap'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/plugin/compiler.rb:490:in `update_stylesheet'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/plugin/compiler.rb:215:in `block in update_stylesheets'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/plugin/compiler.rb:209:in `each'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/plugin/compiler.rb:209:in `update_stylesheets'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/plugin.rb:82:in `update_stylesheets'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/exec/sass_scss.rb:361:in `watch_or_update'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/exec/sass_scss.rb:51:in `process_result'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/exec/base.rb:52:in `parse'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/lib/sass/exec/base.rb:19:in `parse!'
C:/WORK/Server/Ruby22/lib/ruby/gems/2.2.0/gems/sass-3.4.14/bin/scss:13:in `<top (required)>'
C:/WORK/Server/Ruby22/bin/scss:23:in `load'
C:/WORK/Server/Ruby22/bin/scss:23:in `<main>'
*/
body:before {
  white-space: pre;
  font-family: monospace;
  content: "Error: File to import not found or unreadable: compass/utilities/sprites.\A         on line 1 of screen.scss\A \A 1: @import \"compass/utilities/sprites\";\A 2: $menu-spacing: 10px;\A 3: @import \"menu/*.png\";\A 4: @include all-menu-sprites;"; }

Tell me where I went wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question