Rails 无法找到 Idenfity (ImageMagick),即使命令行显示它已安装
如果我运行 identify -version
no 命令行,我会得到:
Version: ImageMagick 6.7.4-2 2012-01-04 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
但是每当我提交表单时,我的 Rails 应用程序都会给出以下内容(这会从上传的图像中生成缩略图):
Could Not Run The `Identify` Command. Please Install ImageMagick.
任何建议将不胜感激!
这就是我的 .bash_profile
的内容:
PATH=$PATH:$HOME/bin:/usr/sbin:/sbin/:/usr/bin:$HOME/.rvm
export PATH=$HOME/local/imagemagick/bin:$PATH
export LD_LIBRARY_PATH=$HOME/local/imagemagick/lib:$LD_LIBRARY_PATH
我的 production.rb 也具有 PaperClip 的正确配置:
Paperclip.options[:command_path] = "/usr/local/bin"
If I run identify -version
no the command line I get:
Version: ImageMagick 6.7.4-2 2012-01-04 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
But my rails app gives the following whenever I submit a form (which makes a thumbnail out of an uploaded image):
Could Not Run The `Identify` Command. Please Install ImageMagick.
Any advice would be greatly appreciated!
This is what my .bash_profile
has:
PATH=$PATH:$HOME/bin:/usr/sbin:/sbin/:/usr/bin:$HOME/.rvm
export PATH=$HOME/local/imagemagick/bin:$PATH
export LD_LIBRARY_PATH=$HOME/local/imagemagick/lib:$LD_LIBRARY_PATH
My production.rb has the correct config for PaperClip as well:
Paperclip.options[:command_path] = "/usr/local/bin"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为 imagemagick 正在寻找 Path,而不是 PATH。
忘记你的 .bash_profile,将其设置在你的脚本中:
I think imagemagick is looking in Path, not PATH.
forget your .bash_profile, set it in your script: