[英]Install ImageMagick for paperclip gem in a Mac OS 10.5.8
I have been trying to install ImageMagick for one week. 我一直在尝试安装ImageMagick一周。 The documentation I found over the net it is contradictory and I didn't find the proper way to install it and configure it. 我在网上找到的文档是矛盾的,我没有找到正确的方法来安装和配置它。 As well as I am not an UNIX expert so I don´t know how to use Enviroments paths correctly. 我不是UNIX专家,因此我不知道如何正确使用Enviroments路径。
My software versions are: SO: Mac OS 10.5.8, ImageMagick v6.7.7, Paperclip v3.1.2, Rails v3.0 我的软件版本是:SO:Mac OS 10.5.8,ImageMagick v6.7.7,Paperclip v3.1.2,Rails v3.0
Some hints: 一些提示:
The ~/.profile file: 〜/ .profile文件:
export PATH=$HOME/Users/mac_name/.gem/ruby/1.8/bin:$PATH
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
export MAGICK_HOME="/Users/mac_name/ImageMagick-6.7.7"
export DYLD_LIBRARY_PATH=$MAGICK_HOME/lib/
export DISPLAY=:0
I install ImageMagick with an installation script. 我用安装脚本安装ImageMagick。 Its located in: Users/mac_name/ImageMagick-6.7.7 Now I think it´s installed but paperclip it does not run. 它位于:Users / mac_name / ImageMagick-6.7.7现在我认为它已经安装但是paperclip却没有运行。 I still have the error: "Photo Could not run the identify
command. Please install ImageMagick". 我仍然有错误:“照片无法运行identify
命令。请安装ImageMagick”。
$ echo $MAGICK_HOME
it returns: "/Users/mac_name/Users/mac_name/ImageMagick-6.7.7" (I don´t know why "Users/mac_name" it is repeated) 它返回:“/ Users / mac_name /Users / mac_name / ImageMagick-6.7.7”(我不知道为什么“Users / mac_name”重复)
I need help. 我需要帮助。 Any other gem that does not need ImageMagick? 任何其他不需要ImageMagick的宝石? I am totally upset of this... 我完全不喜欢这个......
I will suggest you to install homebrew and then install imagemagick using that. 我建议你安装自制软件 ,然后使用它安装imagemagick。
To install Homebrew check this . 要安装Homebrew,请检查此项 。 Basically just copy paste this on your terminal: 基本上只需在您的终端上复制粘贴:
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
Now to install imagemagick run this command: 现在安装imagemagick运行此命令:
brew install imagemagick
Lemme know if you face any issues. Lemme知道你是否面临任何问题。
Mohit has a great answer but the link seems broken now so checkout either Homebrew Homepage at http://brew.sh or the Github page at https://github.com/mxcl/homebrew Mohit有一个很好的答案,但现在链接似乎已经破了,所以在http://brew.sh上的Homebrew主页或https://github.com/mxcl/homebrew的Github页面结账
Both have good instructions on proper installation 两者都有正确安装的良好指示
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.