Forum: Ruby on Rails hi guys problem with running gruff

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
A6357e4b93fdbc32e0e75e7a382b931c?d=identicon&s=25 prem anand (Guest)
on 2007-02-28 03:13
(Received via mailing list)
Hi guys i am pretty much a newbie to rails and tried to install gruff
run the example given in home page for gruff
i am using ubuntu and dapper.

first i got two errors when i used this example
require 'rubygems'
require 'gruff'
g =
g.title = "My Graph""Apples", [1, 2, 3, 4, 4, 3])"Oranges", [4, 8, 7, 9, 8, 9])"Watermelon", [2, 3, 1, 5, 6, 8])"Peaches", [9, 9, 10, 8, 7, 9])
g.labels = {0 => '2003', 2 => '2004', 4 => '2005'}

when i replaced require 'gruff' with require_gem 'gruff' i got rid of
but still this
unintialized name error keeps poppoin when i just run it with ruby
>ruby gruff.rb
>gruff.rb:4: uninitialized constant Gruff (NameError)

Could u guys plese tell me what i am doing wrong.


Prem Anand Thilagar
Univ Of Texas Arlington
Bb4bdf2b184027bc38d4fb529770cde5?d=identicon&s=25 Wes Gamble (weyus)
on 2007-02-28 05:48
I believe that you need both require 'gruff' and the require_gem.
Actually the require_gem is optional as far as I know.  But the thing to
remember is that require_gem does _not_ do a require even though you
would think so from the name.

This topic is locked and can not be replied to.