当我在Ruby on Rails中使用Paperclip上传照片时,在我的本地机器上它可以完美地工作。
当我在我们的Linux(CentOS 5.2)服务器上,使用Apache和Phusion Passenger,尝试在Ruby on Rails中使用Paperclip上传照片时,我得到以下错误信息:
当我在我们的Linux(CentOS 5.2)服务器上,使用Apache和Phusion Passenger,尝试在Ruby on Rails中使用Paperclip上传照片时,我得到以下错误信息:
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.
我尝试添加:
Paperclip.options[:command_path] = "/usr/local/bin"
我将production.rb文件更改了,但没有任何影响。
在日志文件中,我得到了以下错误:
参数:{"commit"=>"上传", "action"=>"更新", "_method"=>"put", "authenticity_token"=>"419410afc22737cd2f6b6096a95327db76a48ba9", "controller"=>"users", "user"=>{"avatar"=>#}} [paperclip] 正在保存附件。 [paperclip] 处理时出现错误:
/tmp/stream20091026-20752-1g568yk-0未被“identify”命令识别。