sh: identify: command not found imagemagick rails

2020-07-13 07:48发布

I am using ImageMagick-6.7.4 with rails 3 and also installed the paperclip gem to my application. I followed this guide to install imagemagick and it works from my terminal but not with my rails app. I have included the path for the identify command in my development.rb as

Paperclip.options[:command_path]='/path-where-my-identify-got-installed/'

but it still gives me an error as

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

1条回答
够拽才男人
2楼-- · 2020-07-13 08:05

You can try making symlink to identify from your directory to usr/bin directory.

ln -s /your/imagemagick/path/identify /usr/bin/identify
查看更多
登录 后发表回答