RichardOnRails
7/3/2006 11:24:00 PM
Hi All,
OK, I've confirmed Rubyw.exe and double-clicking an .rbw file is
working fine on my system.
And Ken: thanks for hanging in there with me.
I haven't used Ruby, and more particularly, with graphics, in several
years. So I was having brain cramps. But I discovered examples I ran
a few years ago. Here's one:
============ GraphicsTest.rbw ===========
#!/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')
============ end ====================
When I double-clicked it, I got the "my...png" file, and when I
double-clicked the .png, I got a beautiful graph displayed by
Microsoft Office Picture Manager.
So, my original question is now answered: there's no problem on my
system. Now I've got to re-learn how to use Rails.
Cheers,
Richard