Forum: Ruby uninitialized constant Ruport::Report (NameError)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mmcolli00 M. (Guest)
on 2009-04-21 22:38
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.
Thanks
MC


http://www.phwinfo.com/forum/comp-lang-ruby/356308...

#! /usr/bin/ruby

require 'ruport'

r = Ruport::Report.new
r.add_mailer :default,
:host => "my.smtp.host",
:address => "my@adress"

r.send_to('send.to@mail') do |mail|
mail.subject = "Subject"
Dir["*.tif"].each { | cName | mail.attach(cName) }
mail.text = "Body text"
end
Mmcolli00 M. (Guest)
on 2009-04-21 23:00
Nevermind this - I see a thread just like this one. Sorry guys.
This topic is locked and can not be replied to.