Gruff on Windows

Has anyone achieved a stable deployment of Gruff with Rmagick on
Windows?
I’ve been playing around with this on Instant Rails and after installing
the
RMagick win 32 gem (local gem install as per instructions on web) and
then
Gruff on top of that. I did a test controller method that rendered the
fruit
pie chart as per the examples on the gruff site. This worked. However,
when
I refreshed the page again my whole SCGI session crashed spectacularly -
unable to compile any pages etc.

Here is the reference code in question:

  require 'RMagick'
  require 'gruff'
  g = Gruff::Line.new
  g.title = "My Graph"
  g.data("Apples", [1, 2, 3, 4, 4, 3])
  g.data("Oranges", [4, 8, 7, 9, 8, 9])
  g.data("Watermelon", [2, 3, 1, 5, 6, 8])
  g.data("Peaches", [9, 9, 10, 8, 7, 9])
  g.labels = {0 => '2003', 2 => '2004', 4 => '2005'}
  send_data(g.to_blob,
        :disposition => 'inline',
        :type => 'image/png',
        :filename => "chart.png")

Firstly, does this code look right for a controller method? Secondly,
should
this work at all on Windows? In a separate rhtml page i had a simple
tag that references this controller method.

Thanks for any help…

Sean.