Hoi all,

I am trying to get pilu's radiant gallery (git edge )extension working on my Radiant(0.7.1) install but the import feature is failing.

I have ImageMagick installed and the RMagick gem installed and am trying to import a directory of jpg images.

The problem appears to be in the gallery_item.rb file in the proportional_resize method. ( http://github.com/pilu/radiant-gallery/blob/7bc3f859ee1b43e69a8e6ec7d983d81a27bf6858/app/models/gallery_item.rb#L113 )

Basically the width and height variables used in this method are 0 which results in a pic_ratio of NaN. I have no idea where these two variables are supposed to be set.

Any help would be much appreciated.



Here is the relevant bit of the error stack trace (With the width and height and picture ratio output using logger.info). Note that all the line numbers are line numbers are out slightly because of the logger line. :

Processing GalleryImportingsController#import (for at 2009-03-14 18:43:29) [PUT]
 Session ID: <snip>
Parameters: {"gallery_id"=>"3", "action"=>"import", "authenticity_token"=>"3e98ee4fdaaf1f03eabd10fdd68b4d287022eedb", "_method"=>"put", "id"=>"1", "controller"=>"gallery_importings"}
Width: 0.0, Height: 0.0
Picture Ratio: NaN

TypeError (nil can't be coerced into Float):
   /vendor/extensions/gallery/app/models/gallery_item.rb:118:in `/'
/vendor/extensions/gallery/app/models/gallery_item.rb:118:in `proportional_resize'
   /vendor/extensions/gallery/app/models/gallery_item.rb:47:in `thumb'
/vendor/extensions/gallery/app/models/gallery_item.rb:84:in `generate_default_thumbnails'
   /vendor/extensions/gallery/app/models/gallery_item.rb:80:in `each'
/vendor/extensions/gallery/app/models/gallery_item.rb:80:in `generate_default_thumbnails'
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to