Jac*_*cob 27 ruby-on-rails rmagick imagemagick ruby-on-rails-3
我有ImageMagick的,RMagick,与回形针的一切设置工作正常,包括配置Paperclip.options[:command_path]的production.rb文件.
突然间,我开始收到以下错误:
Could Not Run The `Identify` Command. Please Install ImageMagick.
Run Code Online (Sandbox Code Playgroud)
我已经尝试了一切.我重新安装了ImageMagick等,但无济于事.
任何帮助将不胜感激.
dan*_*tis 28
从终端运行以下命令:
sudo apt-get install imagemagick
Run Code Online (Sandbox Code Playgroud)
Cri*_*s R 18
您需要更改文件production.rb以及development.rb哪些文件位于:
配置/环境:
# Paperclip config:
Paperclip.options[:image_magick_path] = "/opt/ImageMagick/bin"
Paperclip.options[:command_path] = "/opt/ImageMagick/bin"
Run Code Online (Sandbox Code Playgroud)
只需在最后一行之前添加这两行,然后重新启动服务器即可.
在MacOSX系统中,如果您使用的是其他位置,只需将正确的PATH放在那里.
why*_*ung 12
你可以输入
which convert 和 which identify
检查imagemagick是否安装正确.
在我的情况下,which convert返回/usr/local/bin/convert但是identify not found.
我brew install imagemagick之前使用过,所以我再次运行并返回imagemagick already installed, it's just not linked.
终于明白了,brew link imagemagick(或brew link --overwrite imagemagick)
不要忘记将其添加Paperclip.options[:command_path] = "/usr/local/bin/"到您的config/environment.rb文件中.
我有同样的问题.这对我有用.从终端,首先:
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)
然后:
sudo apt-get install imagemagick
Run Code Online (Sandbox Code Playgroud)
当我从我的rubymine ide启动rails服务器时,我遇到了这个问题.它似乎没有加载你的.zshrc(在我的情况下,也可能对.bashrc有效).因此,没有设置一些使imagemagick与dvm一起工作的环境变量.例如:
export PATH=$HOME/local/imagemagick/bin:$PATH
export LD_LIBRARY_PATH=$HOME/local/imagemagick/lib:$LD_LIBRARY_PATH
Run Code Online (Sandbox Code Playgroud)
一旦我从终端重新启动,错误就消失了.
| 归档时间: |
|
| 查看次数: |
25423 次 |
| 最近记录: |