Search code examples
ruby-on-railsimagemagickcarrierwavehomebrewminimagick

Why can't I properly install ImageMagick on my mac?


I run 'brew install imagemagick' and i get the following error:

==> ./configure --disable-osx-universal-binary --without-perl --prefix=/usr/local/
    Cellar      /imagemagick/6.8.7-0 --enable-shared --disable-static --without-pango 
    --with-modules --disable-op
==> make install
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [magick/libMagickCore-6.Q16.la] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2

I am trying to manipulate an image in ruby on rails using imagemagick. In my PicUploader file, I have the following:

# include CarrierWave::RMagick
include CarrierWave::MiniMagick
process :resize_to_fit => [50, 41]

When I try to upload a picture with RMagick commented out, I receive the following error:

Errno::ENOENT in ProfilesController#create
No such file or directory - identify

I thought maybe it was referring to RMagick, So I uncomment RMagick and try to do it again, and I get:

LoadError in ProfilesController#create
cannot load such file -- RMagick

I am using the carrierwave gem and I can get picture uploading to work without using the process method, but i can't get it to work if I want to resize the picture because imagemagick is not installing properly. How do I fix this? Thanks.


Solution

  • Did you install x11? I think you need to if you're on an OS later than Leopard or something.

    https://gist.github.com/juandazapata/3182604

    Hope this helps.