乐者为王

Do one thing, and do it well.

is not recognized by the 'identify' command

使用Paperclip时遇到一个问题,在上传图片是一直提示图片临时文件is not recognized by the 'identify' command,检查发现临时文件没有问题,有资料说使用Paperclip.options[:command_path]变量可以解决,试过后无效。

查看日志文件看到有如下错误信息:

1
An error was received while processing: #<Paperclip::NotIdentifiedByImageMagickError

根据这条信息找到了解决方法,就是在has_attached_file后将whiny属性设置为false:

1
:whiny => false

Comments