Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I getting Paperclip::CommandNotFoundError with deploy and not on my local?

[paperclip] identify '-format' '%wx%h' '/tmp/stream,3360,1.jpeg[0]' 2>/dev/null
[paperclip] An error was received while processing: #<Paperclip::CommandNotFoundError: Paperclip::CommandNotFoundError>
[paperclip] identify '-format' '%wx%h' '/tmp/stream,3360,1.jpeg[0]' 2>/dev/null
[paperclip] An error was received while processing: #<Paperclip::CommandNotFoundError: Paperclip::CommandNotFoundError>

This is the error in my log tail. Image Paperclip::CommandNotFoundError is what it kicks in the flash error. this is only happening with my deploy, and not with the my dev. anyone had this problem before?

like image 884
thatmiddleway Avatar asked Jul 30 '10 17:07

thatmiddleway


2 Answers

Paperclip uses Imagemagik for image manipulation. The error says it can't find indentify which is an imagemagik command. Make sure your command path to ImageMagik is set properly in all your environments (production, staging, etc):

Paperclip.options[:command_path] = '/path' 
like image 72
nicholasklick Avatar answered Nov 17 '22 21:11

nicholasklick


Error says that command identify is not found. Can you run it from command line? If you do, where's the binary located? In my case it's /opt/local/bin, you can check by type identify. Then add a path to configuration file.

Paperclip.options[:command_path] = "PATH_TO_BINARY"
like image 31
Nikita Rybak Avatar answered Nov 17 '22 22:11

Nikita Rybak