lucasmazza / spriteful

You know, sprites
Other
154 stars 13 forks source link

spriteful using invalid image_optim option #22

Closed fnando closed 10 years ago

fnando commented 10 years ago
/Users/fnando/local/ruby/gems/2.1/gems/image_optim-0.14.0/lib/image_optim/config.rb:64:in `assert_no_unused_options!': unknown options {:pngquant=>true} for pngcrush: false (ImageOptim::ConfigurationError)
pngout: false
optipng: false
advpng: false
pngquant: true
    from /Users/fnando/local/ruby/gems/2.1/gems/image_optim-0.14.0/lib/image_optim.rb:58:in `initialize'
    from /Users/fnando/local/ruby/gems/2.1/gems/spriteful-0.3.4/lib/spriteful/optimizer.rb:11:in `new'
    from /Users/fnando/local/ruby/gems/2.1/gems/spriteful-0.3.4/lib/spriteful/optimizer.rb:11:in `initialize'
    from /Users/fnando/local/ruby/gems/2.1/gems/spriteful-0.3.4/lib/spriteful/cli.rb:84:in `new'
    from /Users/fnando/local/ruby/gems/2.1/gems/spriteful-0.3.4/lib/spriteful/cli.rb:84:in `optimizer'
    from /Users/fnando/local/ruby/gems/2.1/gems/spriteful-0.3.4/lib/spriteful/cli.rb:96:in `create_sprite'
    from /Users/fnando/local/ruby/gems/2.1/gems/spriteful-0.3.4/lib/spriteful/cli.rb:61:in `block in execute'
    from /Users/fnando/local/ruby/gems/2.1/gems/spriteful-0.3.4/lib/spriteful/cli.rb:60:in `each'
    from /Users/fnando/local/ruby/gems/2.1/gems/spriteful-0.3.4/lib/spriteful/cli.rb:60:in `execute'
    from /Users/fnando/local/ruby/gems/2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/fnando/local/ruby/gems/2.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/fnando/local/ruby/gems/2.1/gems/thor-0.19.1/lib/thor/group.rb:230:in `dispatch'
    from /Users/fnando/local/ruby/gems/2.1/gems/spriteful-0.3.4/lib/spriteful/cli.rb:78:in `dispatch'
    from /Users/fnando/local/ruby/gems/2.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/fnando/local/ruby/gems/2.1/gems/spriteful-0.3.4/bin/spriteful:16:in `<top (required)>'
    from /Users/fnando/local/ruby/gems/2.1/bin/spriteful:23:in `load'
    from /Users/fnando/local/ruby/gems/2.1/bin/spriteful:23:in `<main>'
fnando commented 10 years ago

Looks like the list of optimizers must be updated. After tweaking the source to use only pngout, optipng, advpng, I was able to generate the sprite.

$ spriteful flags 
  optimizing  No optimizer found. Please install at least one of the following: pngout, optipng, advpng.
   identical  flags.png
   identical  flags.css
fnando commented 10 years ago

And don't bother about the image_optim 0.14 version. Same error occurred after updating to 0.15.

fnando commented 10 years ago

GO HOME, I'M DRUNK.

Removed all gems, reinstalled, and started working. :O