Hi All,
I get errors when I try to run a Gruff sample for my WinXP/SP2 system
and
get an error which I can’t fathom.
The sample is “Code Sample” from
http://nubyonrails.topfunky.com/pages/gruff
(scroll down to find it). I call it GraphicsTest.rb and display it
below.
When I test it from within SciTE, I get:
ruby GraphicsTest.rb
GraphicsTest.rb:6: uninitialized constant Gruff (NameError)
Exit code: 1
Months ago, I had Gem, Ruby, FxRuby, Rails, etc. all beautifully
installed
and working. I believe the GraphicsTest.rb sample ran fine at that
time.
Then sometime later I had a brain cramp and deleted the entire
installation.
Or maybe I was a victim of alien invaders
I have now reinstalled everything using the one-click installer 1.8.2-15
Stable Release. Shown below is the list of installed components
according to
“gem list --local”.
I ran simple tests on the various components (except Gruff) successfully
until I tried to test Rails using the above sample. Any suggestions as
to
how I might get this test running properly?
–
Regards,
Richard
*** LOCAL GEMS ***
actionmailer (1.1.5)
actionpack (1.11.2)
actionwebservice (1.0.0)
activerecord (1.13.2)
activesupport (1.2.5)
fxri (0.3.2)
fxruby (1.4.4, 1.2.6)
gruff (0.0.9)
rails (1.0.0)
rake (0.7.0)
sources (0.0.1)
=== GraphicTest.rb ===
#!/usr/bin/ruby
require ‘rubygems’
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’}
g.write(‘my_fruity_graph.png’)