Update: Yes! These instructions did the trick.
Gruff is some hot stuff. If you’re working on a Rails app and want to pimp out your backend, or have data that would be much more useful if visually illustrated, it’s the goto tool in the RoR world.

The only problem I’ve had is getting the whole stack of dependencies installed & working on my PPC mac on OS X 10.4.8.
It seems like plenty of people have been able to get it working, so I’m not sure exactly what’s up.
I spent a few hours one night compiling/recompiling the stack to no avail. (Though, Rubyforge being down that evening didn’t help, either. :))
Just tried this option which says to install RMagick via Darwin ports:
sudo port install rb-rmagick
That didn’t work.
Now trying these instructions… (which, incidentally, weren’t available that night b/c of Rubyforge being down. Maybe it’s the golden ticket!
For future Googlers… this was the error I was receiving when trying to build a Gruff graph. I must just not have Postscript/ghostcript or Freetype installed from the looks of it…
sh: line 1: gs: command not found
sh: line 1: gs: command not found
RMagick: no decode delegate for this image format `/var/tmp/magick-HGhhQTrg’.
RMagick: Postscript delegate failed `/var/tmp/magick-HGhhQTrg’.
RuntimeError: Can’t measure text. Are the fonts installed? Is the FreeType library installed?
from /usr/local/lib/ruby/gems/1.8/gems/gruff-0.2.3/lib/gruff/base.rb:875:in `get_type_metrics’
from /usr/local/lib/ruby/gems/1.8/gems/gruff-0.2.3/lib/gruff/base.rb:875:in `calculate_caps_height’
from /usr/local/lib/ruby/gems/1.8/gems/gruff-0.2.3/lib/gruff/base.rb:434:in `setup_graph_measurements’
from /usr/local/lib/ruby/gems/1.8/gems/gruff-0.2.3/lib/gruff/base.rb:397:in `setup_drawing’
from /usr/local/lib/ruby/gems/1.8/gems/gruff-0.2.3/lib/gruff/base.rb:376:in `draw’
from /usr/local/lib/ruby/gems/1.8/gems/gruff-0.2.3/lib/gruff/bar.rb:8:in `draw’
from /usr/local/lib/ruby/gems/1.8/gems/gruff-0.2.3/lib/gruff/base.rb:357:in `write’
Shanti A. Braford blogs here.
If you really want to know, just read this.



