Getting RMagick working on Fedora Core 6

I needed to install rmagick over the weekend as I was playing with the file_column plugin. Rubygems has usually been good to me so I didn’t expect any problems when I issued the command:

#gem install rmagick
/usr/lib/ruby/gems/1.8/gems/rmagick-1.15.5/./lib/rvg/misc.rb:321:in `get_type_metrics': unable to read font `/usr/share/fonts/default/TrueType/verdana.ttf' (Magick::ImageMagickError)
from /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.5/./lib/rvg/misc.rb:321:in `render'
from /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.5/./lib/rvg/misc.rb:696:in `text'
from /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.5/./lib/rvg/text.rb:65:in `add_primitives'
from /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.5/./lib/rvg/container.rb:72:in `add_primitives'
from /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.5/./lib/rvg/container.rb:72:in `each'
from /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.5/./lib/rvg/container.rb:72:in `add_primitives'
from /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.5/./lib/rvg/rvg.rb:264:in `add_outermost_primitives'
from /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.5/./lib/rvg/rvg.rb:264:in `each'
from /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.5/./lib/rvg/rvg.rb:264:in `add_outermost_primitives'
from /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.5/./lib/rvg/rvg.rb:236:in `draw'
from InitialCoords.rb:22
post-setup.rb: InitialCoords.rb example returned error code 256

Uh-oh. It seems I was missing some windows specific fonts. Well obviously, I am using Linux. With no obvious package with the missing fonts available in yum I went looking and found this windows font rpm.

After installing and linking the font dir to the place rmagick expects them:

ln -s /usr/share/fonts/msttcorefonts /usr/share/fonts/default/TrueType

That done #gem install rmagick works!

16 thoughts on “Getting RMagick working on Fedora Core 6

  1. Carl Drinkwater says:

    You could also run sudo gem install rmagick --enable-allow-example-errors – That works on OSX, with ImageMagick installed from MacPorts.

  2. Thanks, this saved my ass today.

  3. Patrick says:

    Thanks a 1,000,000!

  4. On fedora the full command for installing rmagick is:

    gem install rmagick — –build-flags –enable-allow-example-errors

  5. Mirek says:

    Stanislav Bozhvko – you’ve got a beer when in London next time mate!

  6. shmaize says:

    Successfully installed rmagick-1.15.7

  7. garry says:

    awesome! u saved the day for me!

  8. Max says:

    Huh, thanks. I actually don’t even need the TT fonts, as I’m not doing any font rendering; so Stanislav’s pointer is even more useful… Thanks to both!

  9. Eiji says:

    Thanks. Your tip worked very well. I’ll buy you sushi when you come to Japan!

  10. Bob says:

    Dude! Thanks. Sometimes this stuff really does my head in!

  11. Tim Hunter says:

    Here’s the bugzilla entry that describes this problem:

  12. Thanks! Your fix worked like a charm!

  13. joe says:

    yes, that worked! Next time you’re in Seattle I’ll buy you a coffee!

  14. Matt Darby says:

    Saved my ass today too!

  15. nap says:

    Another ass saved (mine this time). Thanks bud.

  16. […] Will’s Web Miscellany » Blog Archive » Getting RMagick working on Fedora Core 6 | ↑ […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s