If you’re bored at your next family party or are looking to light up a late night party with friends you should try installing RMagick on your Mac. It’s so rewarding when you finally go trough it 6 hours later, exhausted, hungry and with a sense of relief that make you feel like you could fly even after eating at Schwartz.

So here’s a little help to get the party started with installing RMagick on Mac OS X from source.

To setup this stuff at StandoutJobs, my starting point was the Hivelogic tutorial. Everyone seem to have the same error: Bus error. After a couple hours banging my head against our StandoutWalls™ I ended up bleeding from the ears and with this reviewed script:

curl -O http://download.savannah.gnu.org/releases/\ freetype/freetype-2.1.10.tar.gz tar xzvf freetype-2.1.10.tar.gz cd freetype-2.1.10 ./configure --prefix=/usr/local make sudo make install cd .. curl -O http://superb-west.dl.sourceforge.net/\ sourceforge/libpng/libpng-1.2.10.tar.bz2 bzip2 -dc libpng-1.2.10.tar.bz2 | tar xv cd libpng-1.2.10 ./configure --prefix=/usr/local make sudo make install cd .. curl -O ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz tar xzvf jpegsrc.v6b.tar.gz cd jpeg-6b ln -s `which glibtool` ./libtool export MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --enable-shared --prefix=/usr/local make sudo make install cd .. curl -O ftp://ftp.remotesensing.org/libtiff/tiff-3.8.2.tar.gz tar xzvf tiff-3.8.2.tar.gz cd tiff-3.8.2 ./configure --prefix=/usr/local make sudo make install cd ..

Now this part was missing from the original tutorial, ghostscript fonts are needed, get the package from http://sourceforge.net/projects/gs-fonts/ and

tar vzxf ghostscript-fonts-std-8.11.tar.gz sudo mv fonts/ /usr/local/share/ghostscript/fonts/

Another missing was the oh-so-obvious (!) exporting of the variables: CPPFLAGS and LDFLAGS , summed up here for your own pleasure:

curl -O http://easynews.dl.sourceforge.net/\ sourceforge/imagemagick/ImageMagick-6.3.0-0.tar.gz tar xzvf ImageMagick-6.3.0-0.tar.gz cd ImageMagick-6.3.0 export CPPFLAGS=-I/usr/local/include export LDFLAGS=-L/usr/local/lib ./configure --prefix=/usr/local \ --disable-static --with-modules --without-perl \ --without-magick-plus-plus --with-quantum-depth=8 \ --with-gs-font-dir=/usr/local/share/ghostscript/fonts make sudo make install cd ..

Now cross your fingers, get your rabit paw, make a little prayer and

sudo gem install RMagick

You’re done (or back to first step)!

Digg this or reddit it if it was useful to you!