2012-06-25 36 views
3

某些事件導致了本地故障。回滾到舊版本的代碼庫仍然會返回相同的失敗。刪除整個回購,重新克隆它,卸載指南針,重新安裝等仍然會產生相同的錯誤。指南針中的Spriting錯誤/問題0.12

mycomputer:myproject(master) me$ compass watch --trace 
>>> Change detected at 14:13:14 to: app/app.sass 
remove assets/images/sprites-sf0f45583b2.png 
NoMethodError on line ["24"] of /Users/me/.rvm/gems/ruby-1.9.3-p194/gems/chunky_png-1.2.5/lib/chunky_png/chunk.rb: undefined method `unpack' for nil:NilClass 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/chunky_png-1.2.5/lib/chunky_png/datastream.rb:78:in `from_io' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/chunky_png-1.2.5/lib/chunky_png/datastream.rb:66:in `block in from_file' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/chunky_png-1.2.5/lib/chunky_png/datastream.rb:66:in `open' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/chunky_png-1.2.5/lib/chunky_png/datastream.rb:66:in `from_file' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/chunky_png-1.2.5/lib/chunky_png/canvas/png_decoding.rb:53:in `from_file' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb:15:in `block in construct_sprite' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb:14:in `each' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/engines/chunky_png_engine.rb:14:in `construct_sprite' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/sprite_methods.rb:62:in `generate' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/functions/sprites.rb:122:in `sprite_url' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/sprite_map.rb:72:in `method_missing' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/sprites/sprite_map.rb:63:in `to_s' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/script/list.rb:44:in `block in to_s' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/script/list.rb:44:in `map' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/script/list.rb:44:in `to_s' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:238:in `visit_prop' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `block in visit_children' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `map' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `visit_children' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:29:in `block in visit_children' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:41:in `with_environment' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:28:in `visit_children' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `block in visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:259:in `visit_rule' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `block in visit_children' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `map' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `visit_children' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:29:in `block in visit_children' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:41:in `with_environment' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:28:in `visit_children' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `block in visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:125:in `visit_if' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:128:in `visit_if' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `block in visit_import' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `map' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `visit_import' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `block in visit_import' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `map' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `visit_import' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `block in visit_import' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `map' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:146:in `visit_import' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `block in visit_children' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `map' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:53:in `visit_children' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:29:in `block in visit_children' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:41:in `with_environment' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:28:in `visit_children' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `block in visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:49:in `visit_root' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/base.rb:37:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:20:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/visitors/perform.rb:7:in `visit' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/tree/root_node.rb:20:in `render' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/engine.rb:308:in `_render' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/sass-3.2.0.alpha.237/lib/sass/engine.rb:255:in `render' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:140:in `block (2 levels) in compile' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:139:in `block in compile' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/logger.rb:45:in `red' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:138:in `compile' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:118:in `compile_if_required' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:103:in `block (2 levels) in run' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `each' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `block in run' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/compiler.rb:100:in `run' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:147:in `recompile' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:68:in `perform' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `execute' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `perform!' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:30:in `block in <top (required)>' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:44:in `call' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:44:in `<top (required)>' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/compass:19:in `load' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/compass:19:in `<main>' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>' 
LoadError on line ["70"] of /Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/watch_project.rb: cannot load such file -- fssm 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:70:in `perform' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `execute' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `perform!' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:30:in `block in <top (required)>' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:44:in `call' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:44:in `<top (required)>' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/compass:19:in `load' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/compass:19:in `<main>' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval' 
/Users/me/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>' 

回答

2

我有類似的問題。複製 - 我下載一個icon from iconmostr並將其包含在我的sprites文件夾中。我得到了同樣的錯誤。重新啓動後,等相同的錯誤。

什麼問題解決了在Photoshop [CS5.5]中打開圖標並使用隔行將圖標重新保存爲.png爲「否」

圖像元閱讀軟件是「Adobe ImageReady」,沒有配置文件名稱(sRGB IEC61966-2.1關於重新導出),沒有DPI(重新導出時爲72)或類型(PNGf上重新導出)保存。

希望這會有所幫助。

1

我也遇到過這個問題。這是由圖像中的異常數據引起的。
optipng the_pic報告了錯誤(Extraneous data found after IEND)
optipng -fix the_pic解決了它,羅盤開始編寫愉快。

P.S.我沒有PhotoShop,錯誤圖像來自我的設計師的PhotoShop(5.0我猜)...似乎某些事情出口出錯。

+0

在Mac上,我使用ImageOptim(http://imageoptim.com/)修復了相同的問題(它捆綁了optipng)。 – voidstate

0

我明白了。對我來說,這個問題是由於沒有包含Compass gem的Gemfile造成的。所以我只是補充道:

gem 'compass' 

問題消失了。錯誤消息對於意識到這是問題非常不利。