sh:识别:找不到命令imagemagick rails 3

Loc*_*thy 5 ruby-on-rails imagemagick

我正在使用带有rails 3的ImageMagick-6.7.4并且还将paperclipgem 安装到我的应用程序中.我按照本指南进行安装imagemagick,它可以在我的终端上运行,但不适用于我的rails应用程序.我在development.rb中包含了identify命令的路径

Paperclip.options[:command_path]='/path-where-my-identify-got-installed/'
Run Code Online (Sandbox Code Playgroud)

但它仍然给我一个错误

Command :: identify -format %wx%h'/var/folders/Cd/CdjXsnlyEPyFqs4pwH83T++++TI/-Tmp-/stream20120104-2402-5iizym-0.png[0]'[paperclip] An error was received while processing: #<Paperclip::CommandNotFoundError: Could not run the `identify` command. 
Please installImageMagick.>Command :: identify -format %wx%h '/var/folders/Cd/CdjXsnlyEPyFqs4pwH83T++++TI/-Tmp-/stream20120104-2402-5iizym-0.png[0]'[paperclip] An error was received while processing: #<Paperclip::CommandNotFoundError: Could not run the `identify` command. Please install ImageMagick.>SQL (0.1ms)  BEGIN
Run Code Online (Sandbox Code Playgroud)

Adr*_*fin 8

您可以尝试使用符号链接从您的目录中识别到usr/bin目录.

ln -s /your/imagemagick/path/identify /usr/bin/identify
Run Code Online (Sandbox Code Playgroud)