views:

498

answers:

2
+2  Q: 

Paperclip Error

Hey,

I'm getting the following error in my development.log

[paperclip] An error was received while processing: #<Paperclip::NotIdentifiedByImageMagickError: /tmp/stream28514-0 is not recognized by the 'identify' command.>

And i've googled about this error and i found out that many people have solved this by adding this line Paperclip.options[:command_path] = "/usr/local/bin"

However, i still get the same error even after adding that line! I've tried everything possible!

Any help would be highly appreciated!

Regards,

Punit

+3  A: 

The Paperclip.options[:command_path] setting is for the location of your ImageMagick executables (in this case identify). Try running which identify and setting the option to be the directory that is returned. If that command doesn't return anything, make sure that ImageMagick is properly installed.

ry
Hey, thanks for your reply.which identify returns /usr/local/binAlso i noticed something strange. The path /tmp/stream28514-0 is not valid. So the file is not getting saved. Does anyone know why this is happenning?
punit
paperclip should remove the files after it is done processing them.Could you try running identify from the command line? I had a similar problem recently when I upgraded ImageMagick and forgot to run ldconfig afterwards.
tliff
A: 

It means that it cannot find ImageMagick's executable identify on the location you specified in Paperclip.options[:command_path] (in your case /usr/local/bin).

This is tipically caused by two reason:

  1. It might be that you actually did not installed ImageMagick.
    • SOLUTION: install it:
      • For MAC: sudo port install ImageMagick (which installs the binary release)
      • For UBUNTU: sudo sudo apt-get install imagemagick
  2. It might be that the location where you installed ImageMagick is not /usr/local/bin but something else.

    • SOLUTION: find where it is installed, or via the command:

      which identify (in case that identify is in the current PATH, as it should be)

    or via a raw find through the file system:

    find / -name identify

Anyway, the usual location for those file in Ubuntu should be /usr/bin

Andrea Salicetti