简体   繁体   中英

Install ImageMagick for paperclip gem in a Mac OS 10.5.8

I have been trying to install ImageMagick for one week. 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.

My software versions are: SO: Mac OS 10.5.8, ImageMagick v6.7.7, Paperclip v3.1.2, Rails v3.0

Some hints:

The ~/.profile file:

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. Its located in: Users/mac_name/ImageMagick-6.7.7 Now I think it´s installed but paperclip it does not run. I still have the error: "Photo Could not run the identify command. Please install 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)

I need help. Any other gem that does not need ImageMagick? I am totally upset of this...

I will suggest you to install homebrew and then install imagemagick using that.

To install Homebrew check this . 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:

  brew install imagemagick

Lemme know if you face any issues.

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

Both have good instructions on proper installation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM