views:

44

answers:

1

Rails3 on passenger. I have imagemagick installed and working correctly however I receive the following error when trying to add an image via paperclip. This works fine on in development, but not in production on passenger.

[paperclip] An error was received while processing: #<Paperclip::PaperclipError: There was an error processing the thumbnail for stream,11629,0>
    [paperclip] /usr/bin/identify '-format' '%wx%h' '/tmp/stream,11629,0.jpg[0]'
    [paperclip] /usr/bin/convert '/tmp/stream,11629,0.jpg[0]' '-resize' '100x100>' '/tmp/stream,11629,0,11629,1'

I created a paperclip.rb file in config/initializers and added

Paperclip.options[:swallow_stderr] = false
Paperclip.options[:command_path] = "/usr/bin/"

but it hasn't fixed it for me. Any ideas?

A: 

Check to see if rmagick is installed...

Run these commands

irb -rubygems -r RMagick

And then once inside of irb:

puts Magick::Long_version

You should get output like:

This is RMagick 2.13.1 ($Date: 2009/12/20 02:33:33 $) Copyright (C) 2009 by Timothy P. Hunter Built with ImageMagick 6.5.9-3 2010-02-19 Q16 http://www.imagemagick.org Built for ruby 1.8.7 Web page: http://rmagick.rubyforge.org Email: [email protected] => nil

If you don't, then I think rmagick is not installed

Jesse Wolgamott
Unfortunately, this won't solve the issue. Paperclip doesn't actually use RMagick. Paperclip shells out to ImageMagick. To check ImageMagick is correctly installed: `identify -version` or `convert -version`.
myabc
RMagick is installed.This is RMagick 2.13.1 ($Date: 2009/12/20 02:33:33 $) Copyright (C) 2009 by Timothy P. HunterBuilt with ImageMagick 6.5.7-8 2009-11-26 Q16 http://www.imagemagick.orgBuilt for ruby 1.8.7Web page: http://rmagick.rubyforge.orgEmail: [email protected]=> nil
raphael_turtle
convert -versionVersion: ImageMagick 6.5.7-8 2009-11-26 Q16 http://www.imagemagick.orgCopyright: Copyright (C) 1999-2009 ImageMagick Studio LLCFeatures: OpenMP
raphael_turtle
@myabc - "RMagick is an interface between the Ruby programming language and ImageMagick/ GraphicsMagick."
Jesse Wolgamott
@Jesse Wolgamott It is indeed. RMagick is used by many other libraries, but not by Paperclip. Paperclip prefers instead to shell out to ImageMagick CLI tools.
myabc