Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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: S.O.: 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...

like image 507
user1170055 Avatar asked Dec 15 '22 22:12

user1170055


1 Answers

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.

like image 58
Mohit Jain Avatar answered Dec 30 '22 16:12

Mohit Jain