Uninitialized constant Ruport::Report (NameError)

I got this code off the website below. I wanted to run and watch the
example then create code with the ruport gem. On the website, the user
never got an answer on why he is getting the error “uninitialized
constant Ruport::Report (NameError)”. I would like for this to work for
me but when I tried to check it out by running it after installing the
ruport gem, I also got that error. Does anyone know how to fix this? I
do get this error now and then but have never understood why it happens.


#! /usr/bin/ruby

require ‘ruport’

r = Ruport::Report.new
r.add_mailer :default,
:host => “my.smtp.host”,
:address => “[email protected]

r.send_to(‘[email protected]’) do |mail|
mail.subject = “Subject”
Dir["*.tif"].each { | cName | mail.attach(cName) }
mail.text = “Body text”

Nevermind this - I see a thread just like this one. Sorry guys.