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!
You could also run sudo gem install
rmagick --enable-allow-example-errors– That works on OSX, with ImageMagick installed from MacPorts.Thanks, this saved my ass today.
Thanks a 1,000,000!
On fedora the full command for installing rmagick is:
gem install rmagick — –build-flags –enable-allow-example-errors
Stanislav Bozhvko – you’ve got a beer when in London next time mate!
Thanks,
Successfully installed rmagick-1.15.7
awesome! u saved the day for me!
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!
Thanks. Your tip worked very well. I’ll buy you sushi when you come to Japan!
Dude! Thanks. Sometimes this stuff really does my head in!
Here’s the bugzilla entry that describes this problem: https://bugzilla.redhat.com/show_bug.cgi?id=291931
Thanks! Your fix worked like a charm!
yes, that worked! Next time you’re in Seattle I’ll buy you a coffee!
Saved my ass today too!
Another ass saved (mine this time). Thanks bud.
[...] Will’s Web Miscellany » Blog Archive » Getting RMagick working on Fedora Core 6 | ↑ [...]