简体   繁体   English

即使命令行显示已安装,Rails也无法找到Idenfity(ImageMagick)

[英]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.

相关问题 即使已安装,Rails也找不到NodeJS - Rails Can't Find NodeJS Even Though it is Installed 即使我已安装Rails,也无法找到exception_notification gem - Rails can't find exception_notification gem even though I have it installed 脚本/控制台不起作用; 报告“缺少Rails宝石。 即使rails显示为已安装,也请`gem install -v = rails ......” - script/console won't work; reports “Missing the Rails gem. Please `gem install -v= rails`…” even though rails shows as installed 即使存在,Rails 也找不到视图模板 - Rails can't find view template even though it exists 缺少Rails 2.3.4宝石。 即使它已安装! - Missing the Rails 2.3.4 gem. Even though it's installed! 即使已安装,Rails仍显示为未安装 - Rails appears as not installed even though it is installed Heroku在我的Ruby on Rails应用程序中找不到文件 - 即使它们就在那里? - Heroku can't find files in my Ruby on Rails app - even though they are right there? Ruby on Rails:即使已安装gem仍未找到 - Ruby on Rails: gem not found even though it is installed 即使安装了正确的gem,rails中的NoMethodError也是如此 - NoMethodError in rails even though correct gem is installed 即使在路径中,“ gem install atomic”也找不到DevKit,为什么? - 'gem install atomic' can't find DevKit even though it's right there in the path, why?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM