chriseppstein/compass — Issue #663: Rails 3.1.3, Compass Alpha 13 - Sprite related errors?
Author: joeybeninghove
Created: 2012-01-03 20:42:15+00:00
State: open

Getting an error in a Rails 3.1.3 attempting to use sprites with Compass. This happens with both dynamically serving of styles as well as during precompilation. Trace below is from a precompile:

** Execute assets:precompile:primary
rake aborted!
can't convert Array into String
(in /Users/joey/code/client/app-rails/app/assets/stylesheets/stylesheet.css.scss)
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/functions/image_size.rb:17:in `extname'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/functions/image_size.rb:17:in `initialize'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/sprites/image.rb:146:in `new'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/sprites/image.rb:146:in `dimensions'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/sprites/image.rb:39:in `width'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/sprites/layout_methods.rb:153:in `block in width_for_vertical_layout'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/sprites/layout_methods.rb:153:in `map'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/sprites/layout_methods.rb:153:in `width_for_vertical_layout'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/sprites/layout_methods.rb:52:in `compute_image_positions!'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/sprites/sprite_methods.rb:16:in `compute_image_metadata!'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/sprites/sprite_map.rb:48:in `initialize'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/sprites/sprite_map.rb:22:in `new'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/sprites/sprite_map.rb:22:in `from_uri'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/compass-0.12.alpha.3/lib/compass/sass_extensions/functions/sprites.rb:41:in `sprite_map'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/script/funcall.rb:88:in `_perform'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/script/node.rb:40:in `perform'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:242:in `visit_variable'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:146:in `block in visit_import'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:146:in `map'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:146:in `visit_import'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:146:in `block in visit_import'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:146:in `map'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:146:in `visit_import'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:27:in `block in visit_children'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:39:in `with_environment'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:26:in `visit_children'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:47:in `visit_root'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:7:in `visit'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/tree/root_node.rb:20:in `render'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/engine.rb:300:in `_render'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-3.1.12/lib/sass/engine.rb:247:in `render'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sass-rails-3.1.5/lib/sass/rails/template_handlers.rb:95:in `evaluate'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/context.rb:175:in `block in evaluate'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `each'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `evaluate'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:171:in `build_dependency_context_and_body'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:135:in `dependency_context'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:194:in `build_dependencies_paths_and_assets'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:141:in `dependency_paths'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:61:in `mtime'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/asset.rb:58:in `block in encode_with'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/asset.rb:57:in `each'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/asset.rb:57:in `encode_with'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:43:in `encode_with'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/caching.rb:52:in `cache_asset'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/index.rb:67:in `block in build_asset'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/index.rb:76:in `memoize'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/index.rb:65:in `build_asset'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/base.rb:99:in `find_asset'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/index.rb:48:in `find_asset'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/base.rb:110:in `[]'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:200:in `block in build_dependencies_paths_and_assets'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:194:in `each'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:194:in `build_dependencies_paths_and_assets'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:141:in `dependency_paths'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:61:in `mtime'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/asset.rb:58:in `block in encode_with'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/asset.rb:57:in `each'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/asset.rb:57:in `encode_with'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:43:in `encode_with'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/caching.rb:52:in `cache_asset'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/index.rb:67:in `block in build_asset'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/index.rb:76:in `memoize'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/index.rb:65:in `build_asset'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/trail.rb:102:in `find_asset_in_path'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/base.rb:101:in `find_asset'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/index.rb:48:in `find_asset'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:20:in `block in compile'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/base.rb:151:in `block in each_logical_path'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/base.rb:139:in `block (2 levels) in each_file'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each_entry'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/base.rb:137:in `block in each_file'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each_file'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/sprockets-2.0.3/lib/sprockets/base.rb:149:in `each_logical_path'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/actionpack-3.1.3/lib/sprockets/assets.rake:52:in `internal_precompile'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/actionpack-3.1.3/lib/sprockets/assets.rake:66:in `block (3 levels) in '
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/joey/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@app-rails/gems/actionpack-3.1.3/lib/sprockets/assets.rake:56:in `block (3 levels) in '
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/joey/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/gems/rake-0.9.2.2/bin/rake:33:in `'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/bin/rake:19:in `load'
/Users/joey/.rvm/gems/ruby-1.9.3-p0@global/bin/rake:19:in `

'
Tasks: TOP => assets:precompile:primary

If we comment out the sprite-related calls in our scss, the error goes away.

Any ideas?