Rails and Os X: How to Install Rmagick

Rails and OS X: How to install rmagick?

rmagick has a problem working with imagemagick (>= 6.8.0-10) from homebrew.

You can either

update rmagick gem by

    bundle update rmagick

or manually symbol link some dylib to make it work:

    $ cd "`Magick-config --prefix`lib"
$ ln -s libMagick++-Q16.7.dylib libMagick++.dylib
$ ln -s libMagickCore-Q16.7.dylib libMagickCore.dylib
$ ln -s libMagickWand-Q16.7.dylib libMagickWand.dylib

After that gem install rmagick should work.

Check the discussion about this in homebrew/issues/16625

Update:
Thanks @faraz for the nice one-liner command:

cd "`Magick-config --prefix`/lib"; ln -s libMagick++-Q8.7.dylib libMagick++.dylib; ln -s libMagickCore-Q8.7.dylib libMagickCore.dylib; ln -s libMagickWand-Q8.7.dylib libMagickWand.dylib

Error installing Rmagick and Imagemagick on MacOS Sierra

Update brew at first
brew update

Then install imagemagic brew install imagemagick@6
Then config path and install rmagic gem

PKG_CONFIG_PATH=/usr/local/opt/imagemagick@6/lib/pkgconfig gem install rmagick

Unable to install Rmagick

Finally , I downgraded the version of imagemagick to make it working i.e.

brew uninstall imagemagick
brew uninstal imagemagick@6

Then, set the path for MagicWand & MagicCore.h

export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick\@6/6.9.7-6/lib/pkgconfig/

Can't install RMagick on OS X Mountain Lion

Fixed it by following these steps. Arrggh!

  1. Install XCode 4.4
  2. Install command line tools (from the preferences in Xcode)
  3. Install XQuartz
  4. Install ImageMagic (brew install —vd imagemagick)
  5. sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2
  6. mdfind MagickWand.h (to get the path to the MagickWand.h file)
  7. C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick gem install rmagick

Bundle can't install RMagick gem on Mac OSX 10.7

I suggest that you use brew to manage your binary dependencies. You can easily install imageMagick with brew, like this:

brew install imagemagick

This is what I have on my system:

imagemagick 6.7.1-1
http://www.imagemagick.org
Depends on: jpeg, libtiff, little-cms, jasper
/usr/local/Cellar/imagemagick/6.7.1-1 (1389 files, 32M)
http://github.com/mxcl/homebrew/commits/master/Library/Formula/imagemagick.rb

And I have the same setup as you have in terms of machine and ruby-version.

RMagick/ImageMagick installation

Thanks to Brad and Matthieu for your suggestions! MiniMagick does seem like a good solution, and Matthieu is definitely right about there being different dependencies from system to system; in my case I ended up giving up on trying to use ImageMagick 7 with RMagick, but I did get it to work with ImageMagick 6. Here's what worked for me:

brew remove imagemagick
PKG_CONFIG_PATH=/usr/local/opt/imagemagick@6/lib/pkgconfig
brew install imagemagick@6
gem install rmagick

Many thanks to this SE post: https://stackoverflow.com/a/41788501/5054505
For the record, I am on OSX Yosemite

Also, see this RMagick issue: https://github.com/rmagick/rmagick/issues/256.
Hopefully this will be fixed soon, but for now it seems like reverting to version 6 is the popular approach.

Error installing Rmagick on Mac OS X

I would strongly recommend you try homebrew, which is a great replacement for macports:

  • http://brew.sh
  • http://github.com/mxcl/homebrew

Once you get homebrew installed, you should be able to install imagemagick and rmagick very easily:

brew install imagemagick     # will take a while!
gem install rmagick

More info here:

http://www.codedrop.ca/blog/archives/214

and here:

http://weblogs.manas.com.ar/mverzilli/2010/05/19/install-the-rmagick-gem-in-the-painless-way-with-homebrewinstall-the-rmagick-gem-in-the-painless-way-with-homebrewinstall-the-rmagick-gem-in-the-painless-way-with-homebrewinstall-the-rmagick-gem-in/

UPDATE: (thanks to JJD and this answer)

Try to install without openpmp if you are having trouble with a chiliproject install:

brew install imagemagick --disable-openmp

UPDATE X2: (thanks to Ramon Araujo's comment)

If you have previously installed imagemagick with homebrew, you will have to unlink it before you install again:

brew unlink imagemagick


Related Topics



Leave a reply



Submit