gpt4 book ai didi

ruby-on-rails - sh : identify: command not found imagemagick rails 3

转载 作者:行者123 更新时间:2023-12-04 17:56:01 25 4
gpt4 key购买 nike

我正在使用带有 rails 3 的 ImageMagick-6.7.4 并且还安装了 paperclip gem 到我的应用程序。我关注了this guide安装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

最佳答案

您可以尝试制作符号链接(symbolic link)以识别从您的目录到 usr/bin 目录。

ln -s /your/imagemagick/path/identify /usr/bin/identify

关于ruby-on-rails - sh : identify: command not found imagemagick rails 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8723506/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com