Michael Siebert
2006-Aug-01 16:08 UTC
[Backgroundrb-devel] actionmailer cant find template in backgroundrb
Im trying to send mails from a backgroundrb worker and it seems like ActionView cant find my template. same code works as a rake task. here my worker: class StatusMailWorker < BackgrounDRb::Rails repeat 1.minutes # <-- hehe! def do_work(args) [...blah...] NotificationMailer.create_daily_report(users, rep, items) end end end its throwing the following error: No rhtml, rxml, rjs or delegate template found for daily_report - (ActionView::ActionViewError) d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_view/base.rb:387:in `find_template_extension_for'' d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_view/base.rb:321:in `pick_template_extension'' d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_view/base.rb:238:in `render_file'' d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_view/base.rb:272:in `render'' d:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:363:in `render'' d:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:358:in `render_message'' d:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:306:in `create!'' d:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:267:in `initialize'' d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `new'' d:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:226:in `method_missing'' ./script/backgroundrb/../../config/../lib/workers/status_mail_worker.rb:26:in `do_work'' <<-- here the mailer is called ./script/backgroundrb/../../config/../lib/workers/status_mail_worker.rb:11:in `do_work'' [...] -- Michael Siebert <info at siebert-wd.de> www.stellar-legends.de - Weltraum-Browsergame im Alpha-Stadium -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060801/3a89e57e/attachment.html
Charles Brian Quinn
2006-Aug-01 16:26 UTC
[Backgroundrb-devel] actionmailer cant find template in backgroundrb
I *think* my workers had to hit: File.expand_path(File.dirname(__FILE__) + "../../../file.txt")) to load a file in rails_root since they reside in lib/workers, I imagine it might be a similar issue with the mailer.... On 8/1/06, Michael Siebert <info at siebert-wd.de> wrote:> Im trying to send mails from a backgroundrb worker and it seems like > ActionView cant find my template. same code works as a rake task. > here my worker: > > class StatusMailWorker < BackgrounDRb::Rails > repeat 1.minutes # <-- hehe! > > def do_work(args) > [...blah...] > > NotificationMailer.create_daily_report(users, rep, > items) > end > end > > end > > its throwing the following error: > > No rhtml, rxml, rjs or delegate template found for daily_report - > (ActionView::ActionViewError) > d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_view/base.rb:387:in > `find_template_extension_for'' > d:/ruby/lib/ruby/gems/1.8/gems/actionpack- > 1.12.3/lib/action_view/base.rb:321:in `pick_template_extension'' > d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_view/base.rb:238:in > `render_file'' > d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_view/base.rb:272:in > `render'' > d:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:363:in > `render'' > d:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:358:in > `render_message'' > d:/ruby/lib/ruby/gems/1.8/gems/actionmailer- > 1.2.3/lib/action_mailer/base.rb:306:in `create!'' > d:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:267:in > `initialize'' > d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `new'' > d:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:226:in > `method_missing'' > ./script/backgroundrb/../../config/../lib/workers/status_mail_worker.rb:26:in > `do_work'' <<-- here the mailer is called > ./script/backgroundrb/../../config/../lib/workers/status_mail_worker.rb:11:in > `do_work'' > [...] > > -- > Michael Siebert <info at siebert-wd.de> > > www.stellar-legends.de - Weltraum-Browsergame im Alpha-Stadium > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > >-- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com
Michael Siebert
2006-Aug-01 17:30 UTC
[Backgroundrb-devel] actionmailer cant find template in backgroundrb
ahhhh yes thank you 2006/8/1, Charles Brian Quinn <me at seebq.com>:> > I *think* my workers had to hit: > > File.expand_path(File.dirname(__FILE__) + "../../../file.txt")) > > to load a file in rails_root since they reside in lib/workers, I > imagine it might be a similar issue with the mailer.... > > On 8/1/06, Michael Siebert <info at siebert-wd.de> wrote: > > Im trying to send mails from a backgroundrb worker and it seems like > > ActionView cant find my template. same code works as a rake task. > > here my worker: > > > > class StatusMailWorker < BackgrounDRb::Rails > > repeat 1.minutes # <-- hehe! > > > > def do_work(args) > > [...blah...] > > > > NotificationMailer.create_daily_report(users, rep, > > items) > > end > > end > > > > end > > > > its throwing the following error: > > > > No rhtml, rxml, rjs or delegate template found for daily_report - > > (ActionView::ActionViewError) > > d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3 > /lib/action_view/base.rb:387:in > > `find_template_extension_for'' > > d:/ruby/lib/ruby/gems/1.8/gems/actionpack- > > 1.12.3/lib/action_view/base.rb:321:in `pick_template_extension'' > > d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3 > /lib/action_view/base.rb:238:in > > `render_file'' > > d:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3 > /lib/action_view/base.rb:272:in > > `render'' > > d:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3 > /lib/action_mailer/base.rb:363:in > > `render'' > > d:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3 > /lib/action_mailer/base.rb:358:in > > `render_message'' > > d:/ruby/lib/ruby/gems/1.8/gems/actionmailer- > > 1.2.3/lib/action_mailer/base.rb:306:in `create!'' > > d:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3 > /lib/action_mailer/base.rb:267:in > > `initialize'' > > d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > `new'' > > d:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3 > /lib/action_mailer/base.rb:226:in > > `method_missing'' > > > ./script/backgroundrb/../../config/../lib/workers/status_mail_worker.rb:26:in > > `do_work'' <<-- here the mailer is called > > > ./script/backgroundrb/../../config/../lib/workers/status_mail_worker.rb:11:in > > `do_work'' > > [...] > > > > -- > > Michael Siebert <info at siebert-wd.de> > > > > www.stellar-legends.de - Weltraum-Browsergame im Alpha-Stadium > > _______________________________________________ > > Backgroundrb-devel mailing list > > Backgroundrb-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > > > > > > > -- > Charles Brian Quinn > self-promotion: www.seebq.com > highgroove studios: www.highgroove.com > slingshot hosting: www.slingshothosting.com >-- Michael Siebert <info at siebert-wd.de> www.stellar-legends.de - Weltraum-Browsergame im Alpha-Stadium -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060801/9ddd9d89/attachment.html