[Mongrel] Rails, Mongrel and Rmagick

John Lauck john-subscribed at recaffeinated.com
Wed May 16 13:48:42 EDT 2007

i have a rails app with a form that allows uploading an image file.  I take
the image file and read it into rmagick to verify that it's an image.  For
some reason I can't catch an exception thrown by rmagick inside the app.
After an invalid image file is uploaded the process just hangs.  I have to
kill mongrel and restart to use the app again.

img = Magick::Image::read(@uploaded_file.path).first

This line above should throw a Magick::ImageMagickError exception.  I've
confirmed this with a simple ruby script.

I've tried adding breakpoints and as soon as this line is reached there's no
coming back, even the breakpointer hangs.

I pasted the method from my active record class here:
http://pastie.caboo.se/62122 .

Does anyone have any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070516/2c9c5cd6/attachment.html 

More information about the Mongrel-users mailing list