botandrose/sprockets-image_compressor — Issue #2: precompile fails with 'has a invalid UTF-8 byte sequence'
Author: PizzaPill
Created: 2012-01-25 16:00:05+00:00
State: open

I was evaluating sprockets-image_compressor 0.1.1 and I run into problems.

System: Ubuntu 11.10 64 bit, Ruby 1.9.3, Rails 3.1.3, sprockets 2.0.3, pngcrush 1.7.9-1, jpegotim 1.2.3-2

Output of rake assets:precompile --trace is:

** Invoke assets:precompile (first_time)
** Execute assets:precompile
/home/user/.rvm/rubies/ruby-1.9.3-p0/bin/ruby /home/user/.rvm/gems/ruby-1.9.3-p0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
/home/user/Projekte/test/app/assets/images/test.jpg has a invalid UTF-8 byte sequence
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/utils.rb:18:in `block in read_unicode'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/utils.rb:12:in `tap'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/utils.rb:12:in `read_unicode'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:165:in `build_dependency_context_and_body'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:135:in `dependency_context'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:194:in `build_dependencies_paths_and_assets'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:141:in `dependency_paths'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:61:in `mtime'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/asset.rb:58:in `block in encode_with'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/asset.rb:57:in `each'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/asset.rb:57:in `encode_with'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:43:in `encode_with'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/caching.rb:52:in `cache_asset'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/index.rb:67:in `block in build_asset'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/index.rb:76:in `memoize'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/index.rb:65:in `build_asset'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/trail.rb:102:in `find_asset_in_path'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:101:in `find_asset'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/index.rb:48:in `find_asset'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:20:in `block in compile'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:151:in `block in each_logical_path'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:139:in `block (2 levels) in each_file'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each_entry'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:137:in `block in each_file'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each_file'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/sprockets-2.0.3/lib/sprockets/base.rb:149:in `each_logical_path'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:18:in `compile'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:52:in `internal_precompile'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:66:in `block (3 levels) in '
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/user/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:56:in `block (3 levels) in '
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/user/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/bin/rake:33:in `'
/home/user/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `load'
/home/user/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `

'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/home/user/.rvm/rubies/ruby-1.9.3-p0/bi...]
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils.rb:80:in `ruby'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:9:in `ruby_rake_task'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:17:in `invoke_or_reboot_rake_task'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/sprockets/assets.rake:25:in `block (2 levels) in '
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/user/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/user/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/bin/rake:33:in `'
/home/user/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `load'
/home/user/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `

'
Tasks: TOP => assets:precompile