我正在使用ImageMagick-6.7.4和rails 3,并将paperclip
gem安装到我的应用程序中。我按照此指南安装了imagemagick
,并且它可以在终端上运行,但无法在我的rails应用程序中使用。我已在development.rb中包含了identify命令的路径。
Paperclip.options[:command_path]='/path-where-my-identify-got-installed/'
但是它仍然给我一个错误,如下:
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
/your/imagemagick/path
添加到$PATH
中(但是在 Rails 应用程序的上下文中,您应该如何执行此操作)。 - Keith Thompson