by mars on 2007-07-05 6 Comments
filed in Work with tags , , ,

Well this is quickly becoming Mars' notes from building software on OS X blog!

Anyway, after following the official RMagick install, gem install rmagick fails with an error like:

/usr/local/lib/ruby/gems/1.8/gems/rmagick-1.15.7/./lib/rvg/misc.rb:321:
in `get_type_metrics': unable to read font `/Library/Fonts/Verdana' (Magick::ImageMagickError)

It seems that the examples fail because of a spurious font choice in the documented examples.

All that is needed to build the RMagick gem successfully at this point is:

sudo gem install rmagick -- --disable-htmldoc

And voila, the examples aren't built, thereby avoiding the problem.

RMagick!

6 Responses to “RMagick install woes on OS X”

Ben commented
2007-08-03 at 10:44 PM

Hey, did you ever actually use rmagick after installing this way?

I was having the same problem and used the option you mention... rmagick then appears to install fine, but when my rails app tries to generate gruff graphs, I get the "unable to read /Library/Fonts/xxx" error again.

Mars commented
2007-08-04 at 11:25 AM

I do not use any type/font features of RMagick, so I've encountered no further problems. It's totally possible that there is really a problem with reading fonts.

Matt Buck commented
2007-09-18 at 02:15 PM

Fantastic, man! This is exactly what I was looking for.

Incidentally, are you looking for Rails work at the moment? I've got a guy that's hounding me to work on a project, but I simply haven't got the time.

Jupiter commented
2008-01-02 at 10:39 AM

Works like a charm!

Fabrice commented
2010-02-11 at 01:08 PM

@ben I had the same issue and realized that the referenced file font (/Library/Fonts/xxx) was... empty; eg file size = 0

Wherever you use RMagic with a font, just be sure that the file is not empty...

Fabrice.

Moschops commented
2010-09-01 at 03:00 AM

Years later this helped a lost soul trying to get the beast that is rmagic to install on a CentOS 5.4 system... thanks man!

Leave a Reply

Markdown is in effect.



Everything is here.