[Backgroundrb-devel] actionmailer cant find template in backgroundrb

Charles Brian Quinn me at seebq.com
Tue Aug 1 12:26:39 EDT 2006


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


More information about the Backgroundrb-devel mailing list