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
<snip>
/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!
April 30th, 2007 at 11:59 am
You could also run sudo gem install
rmagick --enable-allow-example-errors- That works on OSX, with ImageMagick installed from MacPorts.May 2nd, 2007 at 12:14 am
Thanks, this saved my ass today.
May 20th, 2007 at 11:15 pm
Thanks a 1,000,000!
June 14th, 2007 at 9:12 pm
On fedora the full command for installing rmagick is:
gem install rmagick — –build-flags –enable-allow-example-errors
June 18th, 2007 at 8:49 pm
Stanislav Bozhvko - you’ve got a beer when in London next time mate!
June 22nd, 2007 at 10:24 am
Thanks,
Successfully installed rmagick-1.15.7
June 30th, 2007 at 1:10 am
awesome! u saved the day for me!
August 18th, 2007 at 6:05 pm
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!
September 1st, 2007 at 5:20 am
Thanks. Your tip worked very well. I’ll buy you sushi when you come to Japan!
September 11th, 2007 at 4:00 pm
Dude! Thanks. Sometimes this stuff really does my head in!
September 22nd, 2007 at 5:57 pm
Here’s the bugzilla entry that describes this problem: https://bugzilla.redhat.com/show_bug.cgi?id=291931
October 21st, 2007 at 1:37 pm
Thanks! Your fix worked like a charm!
November 5th, 2007 at 11:42 pm
yes, that worked! Next time you’re in Seattle I’ll buy you a coffee!
December 14th, 2007 at 9:34 pm
Saved my ass today too!
March 4th, 2008 at 11:12 pm
Another ass saved (mine this time). Thanks bud.
July 3rd, 2008 at 3:02 am
[...] Will’s Web Miscellany » Blog Archive » Getting RMagick working on Fedora Core 6 | ↑ [...]