pjhyett@gmail.com wrote:
I went through the textfile and was able to get RMagick to make
thumbnails again! The only problem is it fails a bunch of the post
install tests.
They all pretty much look like this:
post-setup.rb: setting up documentation...
/usr/bin/ruby -I /Users/pj/Desktop/RMagick-1.8.1/lib -I
/Users/pj/Desktop/RMagick-1.8.1/ext/RMagick InitialCoords.rb
/Users/pj/Desktop/RMagick-1.8.1/lib/rvg/misc.rb:320:in `render':
undefined method `width' for nil:NilClass (NoMethodError)
from /Users/pj/Desktop/RMagick-1.8.1/lib/rvg/misc.rb:688:in
`text'
Looks like a problem with the font configuration. Try this:
Go to /opt/local/lib/ImageMagick-6.x.y/config, where 6.x.y is the actual version number of ImageMagick you installed.
Open the file type.xml in a text editor. It should look like this:
<?xml version="1.0"?>
<typemap>
<include file="type-ghostscript.xml" />
</typemap>
Then edit the type-ghostscript.xml file in the same directory. You should see a lot of entries that look like this:
<type
name="AvantGarde-Book"
fullname="AvantGarde Book"
family="AvantGarde"
foundry="URW"
weight="400"
style="normal"
stretch="normal"
format="type1"
metrics="/opt/local/share/ghostscript/fonts/a010013l.afm"
glyphs="/opt/local/share/ghostscript/fonts/a010013l.pfb"
/>
Make sure that the directory shown in the "metrics" attribute exists on your system and that it actually contains the specified files.
The /opt/local/share/directory/ghostscript/fonts directory is created when you install X11. You have to specify this directory with the --with-gs-font-dir= option when you configure ImageMagick.
If the metrics and glyphs attributes have the wrong directory then you can either re-build and re-install ImageMagick, specifying the correct directory, or you can just edit the type-ghostscript.xml file yourself (if you're comfortable with that).
If you don't have the fonts on your system at all then you need to install X11.
If the fonts are present and the type-ghostscript.xml file has the right directory then something else is wrong.
Let me know either way. Good luck!
Background: ImageMagick/GraphicsMagick doesn't search your system for fonts during the installation process. It just assumes that you have a predefined (common) set of fonts. All you can do is tell it where these fonts are at. If you don't have those fonts then you get errors at run-time.