[英]Rails can't find Idenfity (ImageMagick) even though commandlines shows it's installed
If I run identify -version
no the command line I get: 如果我运行identify -version
没有命令行:
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): 但是,无论何时提交表单(从上传的图片中提取缩略图),我的rails应用程序都会提供以下信息:
Could Not Run The `Identify` Command. Please Install ImageMagick.
Any advice would be greatly appreciated! 任何建议将不胜感激!
This is what my .bash_profile
has: 这是我的.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
My production.rb has the correct config for PaperClip as well: 我的production.rb也具有PaperClip的正确配置:
Paperclip.options[:command_path] = "/usr/local/bin"
I think imagemagick is looking in Path, not PATH. 我认为imagemagick在寻找Path,而不是PATH。 forget your .bash_profile, set it in your script: 忘记您的.bash_profile,在脚本中进行设置:
ENV['Path'] = '/path/to/ImageMagick/bin'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.