如果我运行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
但每当我提交表单(从上传的图片中制作缩略图)时,我的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"
答案 0 :(得分:1)
我认为imagemagick正在寻找Path,而不是PATH。 忘记你的.bash_profile,在你的脚本中设置它:
ENV['Path'] = '/path/to/ImageMagick/bin'