10

With the MacPorts version of ImageMagick 6.4.4 installed, I'm getting an error installing the RMagick gem.

/opt/local/bin/ruby extconf.rb update rmagick
checking for Ruby version >= 1.8.2... yes
checking for /usr/bin/gcc-4.0... yes
checking for Magick-config... no
Can't install RMagick 2.7.0. Can't find Magick-config in
    /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands:
    /Users/jason/.bin:/opt/local/bin:/usr/local/bin:/usr/local/mysql/bin:
    /usr/local/ec2-api-tools/bin:/opt/local/bin:/usr/bin:
    /usr/local/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin

I've installed older versions of rmagick successfully. I've seen references to a dev package of ImageMagick, but it doesn't seem to be available from MacPorts.

How can I install RMagick 2.7 on Mac OS X with ImageMagick 6.4.4 from MacPorts?

Wesley
  • 10,652
  • 4
  • 37
  • 52
Jason Wadsworth
  • 933
  • 1
  • 10
  • 18

4 Answers4

22

I suggest using Homebrew instead of Macports. After installing Homebrew, run:

brew install imagemagick
gem install rmagick
Glorfindel
  • 21,988
  • 13
  • 81
  • 109
balexand
  • 9,549
  • 7
  • 41
  • 36
7

Try this from the command line before installing the rmagick gem:

sudo port install tiff -macosx imagemagick +q8 +gs +wmf

Also have you read the installation documentation here ?

user6325
  • 264
  • 1
  • 2
  • This was also helpful because of the reference back to rmagick's page and because it installed ImageMagick properly using MacPorts. – Thomas Bindzus Jun 04 '13 at 21:08
4

The install script can't find Magick-config in your path. Did you use a non-standard install location when you installed ImageMagick through MacPorts? Usually it goes into /opt/local/bin/

You can see where MacPorts put your Magick-config by running:

port contents ImageMagick

If you find it listed there, then make sure that the directory is included in your PATH and rerun the rmagick install.

Mike
  • 1,539
  • 10
  • 12
1

I've run the install command, but I keep getting this error:

/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- RMagick2.so (LoadError)

Turns out it correctly builds the shared object file, but the name is "wrong".

The file I get is named /Library/Ruby/Gems/1.8/gems/rmagick-2.11.1/lib/RMagick2.bundle; renaming it to RMagick2.so fixes this issue.

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356