When I try to upload a photo in Ruby on Rails using Paperclip on my local machine it works perfectly.
When I try to upload a photo in Ruby on Rails using Paperclip on our Linux (CentOS 5.2) server with Apache and Phusion Passenger, I get:
2 errors prohibited this user from being saved
There were problems with the following fields:
- Avatar /tmp/stream20091026-21120-1qdbnul-0 is not recognized by the 'identify' command.
- Avatar /tmp/stream20091026-21120-1qdbnul-0 is not recognized by the 'identify' command.
I tried adding:
Paperclip.options[:command_path] = "/usr/local/bin"
to production.rb but it didn't make a difference.
In the log files I get the following errors:
Parameters: {"commit"=>"Upload",
"action"=>"update", "_method"=>"put",
"authenticity_token"=>"419410afc22737cd2f6b6096a95327db76a48ba9",
"controller"=>"users",
"user"=>{"avatar"=>#}}
[paperclip] Saving attachments.
[paperclip] An error was received
while processing:/tmp/stream20091026-20752-1g568yk-0 is
not recognized by the 'identify'
command.
Best Answer
Identify is a command-line utility inside the ImageMagick package.
From its homepage:
First, copy the image on the server and run the identify command on it. You should receive something like:
If you receive an error, try upgrading the ImageMagick package on your server. You may find an updated binary release here: http://www.imagemagick.org/script/binary-releases.php