plasticine / middleman-imageoptim

Small images are small! Compress yours during middleman build.
https://rubygems.org/gems/middleman-imageoptim
MIT License
154 stars 42 forks source link

Not Working #6

Closed gasatrya closed 10 years ago

gasatrya commented 10 years ago

I ran bundle exec middleman build but i got this error message.

E:\xampp\htdocs\newdangdoothtml>bundle exec middleman build
      create  build/dummy/singlepost.png
      create  build/img/ul.png
      create  build/img/sep.png
      create  build/dummy/bg.png
      create  build/dummy/blog.png
      create  build/dummy/event-map.png
      create  build/dummy/event.png
      create  build/dummy/gravatar.png
      create  build/dummy/maps.png
      create  build/dummy/photo-1.png
      create  build/img/quote.png
      create  build/dummy/photo-3.png
      create  build/dummy/photo-4.png
      create  build/img/bg_direction_nav.png
      create  build/dummy/relatedphoto.png
      create  build/img/remove.png
      create  build/dummy/photo-2.png
      create  build/dummy/photosingle.jpg
      create  build/fonts/fontawesome-webfont.svg
      create  build/fonts/fontawesome-webfont.woff
      create  build/fonts/FontAwesome.otf
      create  build/fonts/fontawesome-webfont.ttf
      create  build/fonts/fontawesome-webfont.eot
      create  build/js/snippet.js
      create  build/js/plugins.js
      create  build/js/main.js
      create  build/js/html5.js
      create  build/js/jquery.js
      create  build/font-awesome.css
      create  build/style.css
      create  build/archive.html
      create  build/event.html
      create  build/contact.html
      create  build/news.html
      create  build/photo.html
      create  build/single-event.html
      create  build/single-news.html
      create  build/single-photo.html
      create  build/single-video.html
      create  build/cart.html
      create  build/video.html
C:/Ruby193/lib/ruby/gems/1.9.1/gems/image_optim-0.9.1/lib/image_optim.rb:223:in
``': No such file or directory - env PATH=:C:/Ruby193/lib/ruby/gems/1.9.1/bin\;C
:\\Ruby193\\bin\;C:\\Windows\\system32\;C:\\Windows\;C:\\Windows\\System32\\Wbem
\;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\\;C:\\Program\ Files\\WIDCOMM\
\Bluetooth\ Software\\\;C:\\Program\ Files\\WIDCOMM\\Bluetooth\ Software\\syswow
64\;C:\\Program\ Files\\TortoiseGit\\bin:C:/Ruby193/lib/ruby/gems/1.9.1/gems/ima
ge_optim-0.9.1/vendor which pngcrush (Errno::ENOENT)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/image_optim-0.9.1/lib/image_opt
im.rb:223:in `bin_accessible?'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/image_optim-0.9.1/lib/image_opt
im.rb:183:in `block in resolve_bin!'
        from <internal:prelude>:10:in `synchronize'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/image_optim-0.9.1/lib/image_opt
im.rb:170:in `resolve_bin!'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/image_optim-0.9.1/lib/image_opt
im/worker.rb:67:in `resolve_bin!'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/image_optim-0.9.1/lib/image_opt
im/worker.rb:85:in `build_command!'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/image_optim-0.9.1/lib/image_opt
im/worker.rb:72:in `execute'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/image_optim-0.9.1/lib/image_opt
im/worker/pngcrush.rb:25:in `optimize'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/image_optim-0.9.1/lib/image_opt
im.rb:111:in `block in optimize_image'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/image_optim-0.9.1/lib/image_opt
im.rb:107:in `each'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/image_optim-0.9.1/lib/image_opt
im.rb:107:in `optimize_image'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/image_optim-0.9.1/lib/image_opt
im.rb:203:in `block in run_method_for'
        from C:/Ruby193/lib/ruby/1.9.1/win32ole.rb:13:in `call'
        from C:/Ruby193/lib/ruby/1.9.1/win32ole.rb:13:in `block in initialize'

My gemfile

# If you have OpenSSL installed, we recommend updating
# the following line to use "https"
source 'http://rubygems.org'

gem "middleman", "~>3.2.0"
gem "middleman-livereload", "~>3.1.0"

# Compress images
gem "middleman-imageoptim", "~> 0.1.3"

# Compass plugins
gem "susy", "~> 1.0.9" # Susy

# For faster file watcher updates:
gem "wdm", "~> 0.1.0" # Windows

# Cross-templating language block fix for Ruby 1.8
platforms :mri_18 do
  gem "ruby18_source_location"
end

Environment Ruby 1.9.3, win 7 64 bit

plasticine commented 10 years ago

Hey there, looks like it is failing on finding pngcrush, which you need to make sure that you make available on your path. Can’t say I have any experience with this on Windows, though I recommend you go over to the imageoptim repo and make sure you can install all the dependancies.

Closing this issue as it has nothing to do with this gem.

gasatrya commented 10 years ago

ok thanks