imageOptim :: binresolver ::错误:bin解决错误:远程:pngout worker;使用im



我的环境上的构建包如下

=== xyz-app Buildpack URLs
1. https://github.com/jasonfb/heroku-buildpack-cedar14-imagemagick704
2. https://github.com/bobbus/image-optim-buildpack
3. heroku/ruby

我正在尝试添加image_optim,image_optim_rails和image_optim_pack到我的导轨4.1应用于Heroku Cedar-14

当我尝试仅使用image_optim推动环境时,我就能成功完成构建。添加此宝石

宝石'image_optim_rails'并捆绑安装它,然后再次推到Heroku,我在构建阶段发生崩溃

WARN: pngcrush 1.7.15 at /tmp/codon/vendor/bin/pngcrush (< 1.7.38) does not have blacken flag
remote:        WARN: gifsicle 1.78 at /tmp/codon/vendor/bin/gifsicle (< 1.85) does not support removing extension blocks
remote:        rake aborted!
remote:        ImageOptim::BinResolver::Error: Bin resolving errors:
remote:        pngout worker: `pngout` not found; please provide proper binary or disable this worker (--no-pngout argument or `:pngout => false` through options)
remote:        pngquant worker: `pngquant` not found; please provide proper binary or disable this worker (--no-pngquant argument or `:pngquant => false` through options)
remote:        jhead worker: `jhead` not found; please provide proper binary or disable this worker (--no-jhead argument or `:jhead => false` through options)
remote:        svgo worker: `svgo` not found; please provide proper binary or disable this worker (--no-svgo argument or `:svgo => false` through options)
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/image_optim-0.24.2/lib/image_optim/worker/class_methods.rb:73:in `create_all'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/image_optim-0.24.2/lib/image_optim/worker/class_methods.rb:44:in `create_all_by_format'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/image_optim-0.24.2/lib/image_optim.rb:86:in `initialize'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/image_optim_rails-0.2.0/lib/image_optim/railtie.rb:28:in `new'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/image_optim_rails-0.2.0/lib/image_optim/railtie.rb:28:in `block in <class:Railtie>'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:30:in `instance_exec'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:30:in `run'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:55:in `block in run_initializers'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:54:in `run_initializers'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/railties-4.1.14.2/lib/rails/application.rb:300:in `initialize!'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/railties-4.1.14.2/lib/rails/railtie.rb:194:in `public_send'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/railties-4.1.14.2/lib/rails/railtie.rb:194:in `method_missing'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/config/environment.rb:5:in `<top (required)>'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:247:in `block in require'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:232:in `load_dependency'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:247:in `require'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/railties-4.1.14.2/lib/rails/application.rb:276:in `require_environment!'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/railties-4.1.14.2/lib/rails/application.rb:405:in `block in run_tasks_blocks'
remote:        /tmp/build_a3bca6e7188e4157414469f76bf31f7d/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
remote:        Tasks: TOP => environment
remote:        (See full trace by running task with --trace)
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to mackweldon-europa.
remote: 
To git@heroku.com:mackweldon-europa.git
 ! [remote rejected] image-optim-branch -> master (pre-receive hook declined)

当我安装两个宝石时:

gem 'image_optim_rails'
gem 'image_optim_pack'

(请参阅玩具/image_optim_rails文档)

它有效&amp;当推到Heroku

时,构建干净

最新更新