Closed shinokada closed 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.
This is fixed:
gem install gallerize-cli -v 0.2.0
It still does not create images and index.html for me.
➜ folder-with-pictures gem uninstall gallerize-cli
Select gem to uninstall:
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
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')
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:in
choose_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:in
run_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:in
create'
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:in
block 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:in
open'
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:in
choose_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:in
run_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:in
create'
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:in
block 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:in
open'
from (irb):3
from /Users/teacher/.rbenv/versions/2.1.1/bin/irb:11:in `
do you have the system library imagemagick installed? http://www.imagemagick.org/ brew install imagemagick apt-get install imagemagick
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'
➜ folder-with-pictures open static-gallery/index.html
The file /Users/teacher/Documents/folder-with-pictures/static-gallery/index.html does not exist.
choose_processor': undefined method
size' 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:inmogrify?' 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:in
run_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:invalid?' 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:in
create' 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:inread' 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:in
block 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/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/gallerize-cli-0.1.1/lib/gallerize.rb:191:ingenerate_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:in
block 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:incall' 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_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:inprocess_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:in
block 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:infork' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:291:in
worker' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:279:inblock 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:in
each' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:278:increate_workers' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/parallel-1.0.0/lib/parallel.rb:242:in
work_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:inmap' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/gallerize-cli-0.1.1/lib/gallerize.rb:53:in
generate_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:inperform' from /Users/teacher/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/gallerize-cli-0.1.1/lib/gallerize.rb:33:in
generate' 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:in
require_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:in
load' from /Users/teacher/.rbenv/versions/2.1.1/bin/gallerize:23:in `