本文介绍了回形针错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 development.log 中出现以下错误

I'm getting the following error in my development.log

[paperclip] 处理时收到错误:#<Paperclip::NotIdentifiedByImageMagickError:/tmp/stream28514-0 不能被identify"命令识别.>

[paperclip] An error was received while processing: #<Paperclip::NotIdentifiedByImageMagickError: /tmp/stream28514-0 is not recognized by the 'identify' command.>

我用谷歌搜索了这个错误,我发现很多人通过添加这一行来解决这个问题Paperclip.options[:command_path] = "/usr/local/bin"

And i've googled about this error and i found out that many people have solved this by adding this line Paperclip.options[:command_path] = "/usr/local/bin"

但是,即使添加了该行,我仍然遇到相同的错误!我已经尝试了一切可能!

However, i still get the same error even after adding that line! I've tried everything possible!

任何帮助将不胜感激!

问候,

普尼特

推荐答案

Paperclip.options[:command_path] 设置用于您的 ImageMagick 可执行文件的位置(在本例中为标识).尝试运行 which identify 并将选项设置为返回的目录.如果该命令没有返回任何内容,请确保已正确安装 ImageMagick.

The Paperclip.options[:command_path] setting is for the location of your ImageMagick executables (in this case identify). Try running which identify and setting the option to be the directory that is returned. If that command doesn't return anything, make sure that ImageMagick is properly installed.

这篇关于回形针错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 10:19