指南针|无法编译! Zlib Buffer错误

时间:2014-03-04 14:18:01

标签: ruby compass-sass zlib

突然间我无法编制指南针文件!

我已经尝试升级我的ruby,ruby-gems,zlib ..并没有任何帮助..

$ compass compile --trace
Zlib::BufError on line ["230"] of /var/lib/gems/2.0.0/gems/chunky_png-1.3.0/lib/chunky_png/chunk.rb: buffer error
  /var/lib/gems/2.0.0/gems/chunky_png-1.3.0/lib/chunky_png/chunk.rb:230:in `combine_chunks'
  /var/lib/gems/2.0.0/gems/chunky_png-1.3.0/lib/chunky_png/datastream.rb:148:in `imagedata'
  /var/lib/gems/2.0.0/gems/chunky_png-1.3.0/lib/chunky_png/canvas/png_decoding.rb:88:in `from_datastream'
  /var/lib/gems/2.0.0/gems/chunky_png-1.3.0/lib/chunky_png/image.rb:74:in `from_datastream'
  /var/lib/gems/2.0.0/gems/chunky_png-1.3.0/lib/chunky_png/canvas/png_decoding.rb:53:in `from_file'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb:15:in `block in construct_sprite'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb:14:in `each'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb:14:in `construct_sprite'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/sprite_methods.rb:62:in `generate'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/functions/sprites.rb:122:in `sprite_url'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/script/funcall.rb:113:in `_perform'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/script/node.rb:40:in `perform'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:298:in `visit_prop'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:37:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:100:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:268:in `block (3 levels) in visit_mixin'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:268:in `map'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:268:in `block (2 levels) in visit_mixin'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:268:in `block in visit_mixin'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:70:in `perform_arguments'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:263:in `visit_mixin'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:37:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:100:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:53:in `map'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:53:in `visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:37:in `block in visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:320:in `visit_rule'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:37:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:100:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:53:in `map'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:53:in `visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:37:in `block in visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:320:in `visit_rule'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:37:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:100:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:53:in `map'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:53:in `visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:37:in `block in visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:320:in `visit_rule'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:37:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:100:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:227:in `block in visit_import'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:227:in `map'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:227:in `visit_import'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:37:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:100:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:227:in `block in visit_import'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:227:in `map'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:227:in `visit_import'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:37:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:100:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:53:in `map'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:53:in `visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:37:in `block in visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:128:in `visit_root'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/base.rb:37:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:100:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/visitors/perform.rb:7:in `visit'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/tree/root_node.rb:20:in `render'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/engine.rb:315:in `_render'
  /var/lib/gems/2.0.0/gems/sass-3.2.14/lib/sass/engine.rb:262:in `render'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:140:in `block (2 levels) in compile'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:139:in `block in compile'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/logger.rb:45:in `red'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:138:in `compile'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:118:in `compile_if_required'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:103:in `block (2 levels) in run'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `each'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `block in run'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/compiler.rb:100:in `run'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/commands/update_project.rb:45:in `perform'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `execute'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/bin/compass:30:in `block in <top (required)>'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/bin/compass:44:in `call'
  /var/lib/gems/2.0.0/gems/compass-0.12.2/bin/compass:44:in `<top (required)>'
  /usr/local/bin/compass:23:in `load'
  /usr/local/bin/compass:23:in `<main>'

2 个答案:

答案 0 :(得分:0)

你有没有更新你的Linux?

尝试以下方法:

sudo apt-get install zlibc zlib1g-dev zlib1g

然后更新你的红宝石:

gem update --system

答案 1 :(得分:0)

谢谢,问题是我在sprites文件夹中有一个非图像文件。