blakehilscher / gallerize

Generate a static gallery from a set of images
50 stars 5 forks source link

No images and index.html #1

Closed shinokada closed 10 years ago

shinokada commented 10 years ago

After running gallerize as shown followings, I found not images and not index.html.

What am I doing wrong here??

➜ folder-with-pictures gallerize copy /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/gallerize-cli-0.1.1/css static-gallery/css copy /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/gallerize-cli-0.1.1/js static-gallery/js generate_image 1200x800 static-gallery/images/dsc02338.jpg generate_image 1200x800 static-gallery/images/dsc02339.jpg generate_image 1200x800 static-gallery/images/dsc02340.jpg generate_image 1200x800 static-gallery/images/dsc02342.jpg generate_image 1200x800 static-gallery/images/dsc02341.jpg generate_image 1200x800 static-gallery/images/dsc02343.jpg /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick.rb:24:in choose_processor': undefined methodsize' for nil:NilClass (NoMethodError) from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick.rb:64:in mogrify?' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:360:inrun_command' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:171:in valid?' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:140:increate' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:48:in read' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:111:inblock in open' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:110:in open' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:110:inopen' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/gallerize-cli-0.1.1/lib/gallerize.rb:191:in generate_image' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/gallerize-cli-0.1.1/lib/gallerize.rb:54:inblock in generate_images' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:389:in call' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:389:incall_with_index' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:315:in process_incoming_jobs' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:298:inblock in worker' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:291:in fork' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:291:inworker' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:279:in block in create_workers' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:278:ineach' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:278:in create_workers' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:242:inwork_in_processes' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:114:in map' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/gallerize-cli-0.1.1/lib/gallerize.rb:53:ingenerate_images' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/gallerize-cli-0.1.1/lib/gallerize.rb:41:in perform' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/gallerize-cli-0.1.1/lib/gallerize.rb:33:ingenerate' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/gallerize-cli-0.1.1/lib/gallerize.rb:255:in <top (required)>' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/gallerize-cli-0.1.1/bin/gallerize:4:inrequire_relative' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/gallerize-cli-0.1.1/bin/gallerize:4:in <top (required)>' from /Users/teacher/.rbenv/versions/2.1.1/bin/gallerize:23:inload' from /Users/teacher/.rbenv/versions/2.1.1/bin/gallerize:23:in `

' ➜ folder-with-pictures open static-gallery/index.html The file /Users/teacher/Documents/folder-with-pictures/static-gallery/index.html does not exist.

blakehilscher commented 10 years ago

Thanks for showing this issue. It looks like it's failing while trying to create thumbnails from one of your images. I will create a bugfix for this.

blakehilscher commented 10 years ago

This is fixed:

gem install gallerize-cli -v 0.2.0

shinokada commented 10 years ago

It still does not create images and index.html for me.

➜ folder-with-pictures gem uninstall gallerize-cli

Select gem to uninstall:

  1. gallerize-cli-0.1.1
  2. gallerize-cli-0.2.0
  3. All versions

    1 Successfully uninstalled gallerize-cli-0.1.1

➜ folder-with-pictures gem list ... gallerize-cli (0.2.0) ... ➜ folder-with-pictures gallerize copy ./css /Users/teacher/Documents/folder-with-pictures/gallerize/css ... ➜ folder-with-pictures ls DSC02309.JPG DSC02310.JPG DSC02311.JPG DSC02312.JPG DSC02313.JPG gallerize ➜ folder-with-pictures cd gallerize ➜ gallerize ls css images js ➜ gallerize images/ ➜ images ls ➜ images

blakehilscher commented 10 years ago

The update I made just causes it to skip over unprocessable images. For some reason it's unable to read the EXIF data on your images. Try opening one of your images in irb and see if you can narrow down the problem.

$ irb require 'mini_magick' image = MiniMagick::Image.open('DSC02309.JPG') image.resize('100x100') image.write('test.jpg')

shinokada commented 10 years ago

It gives NoMethodError. I tried it with my image and also downloaded a wallpaper image from your demo as well. ➜ folder-with-pictures irb irb(main):001:0> require 'mini_magick' => true irb(main):002:0> image = MiniMagick::Image.open('DSC02309.JPG') NoMethodError: undefined method size' for nil:NilClass from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick.rb:24:inchoose_processor' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick.rb:64:in mogrify?' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:360:inrun_command' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:171:in valid?' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:140:increate' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:48:in read' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:111:inblock in open' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:110:in open' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:110:inopen' from (irb):2 from /Users/teacher/.rbenv/versions/2.1.1/bin/irb:11:in `

'

I tried it with a demo image.

irb(main):003:0> image = MiniMagick::Image.open('wallpaper-558392.jpg') NoMethodError: undefined method size' for nil:NilClass from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick.rb:24:inchoose_processor' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick.rb:64:in mogrify?' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:360:inrun_command' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:171:in valid?' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:140:increate' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:48:in read' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:111:inblock in open' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:110:in open' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:110:inopen' from (irb):3 from /Users/teacher/.rbenv/versions/2.1.1/bin/irb:11:in `

' irb(main):004:0>

blakehilscher commented 10 years ago

do you have the system library imagemagick installed? http://www.imagemagick.org/ brew install imagemagick apt-get install imagemagick