Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Paperclip Error

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

like image 592
Punit Rathore Avatar asked Oct 07 '09 18:10

Punit Rathore


2 Answers

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.

like image 75
ry. Avatar answered Nov 08 '22 20:11

ry.


Here is what worked for me...

I uninstalled the imagemagick that i installed from the official webpage. I reinstalled it from sudo apt-get install imagemagick

then i did write Paperclip.options[:command_path] = "to/correct/path"

THE PROBLEM HERE WAS...

when i ran "which identify" it appearde that the path was "usr/local/bin/identify" it means that we I was supposed to put as a path "usr/local/bin" as my path.

BUT IT DIDN'T WORKED!

I surprisingly found that i identify was also in the "usr/bin" path. So i changed: "usr/local/bin" to "usr/bin"

And that was all!

like image 25
aiionx Avatar answered Nov 08 '22 18:11

aiionx