当我上传照片时,我的模型未通过验证,即使没有任何验证,我也会收到以下错误消息:
/tmp/stream20100103-13830-ywmerx-0 is not recognized by the 'identify' command. and
/tmp/stream20100103-13830-ywmerx-0 is not recognized by the 'identify' command.
我相信这与ImageMagick无关,因为我已经从上传过程中删除了任何图像处理,并尝试上传了不同的MIME类型,例如.txt文件等。
此外,我发现可能有用的东西。一篇博客文章声称在我的环境中(在这种情况下是development.rb)放置以下内容可能起作用。
Paperclip.options[:command_path] = "/opt/local/bin"
command_path
选项需要指向安装了identify
的位置。从命令行可以使用which identify
来确定此位置。 - Ryan McGeary