Mailer error missing template

后端 未结 8 1014
谎友^
谎友^ 2021-02-18 21:25

Hello,

I have problem with ActionMailer, when I try to execute action:

rake send_email

I get a error:



        
8条回答
  •  [愿得一人]
    2021-02-18 22:08

    It's likely that Rails just isn't finding your newly created files. If you have the spring gem running, that could be the issue. (More on spring: https://github.com/rails/spring)

    To setup terminal commands and stop running spring:

     $ bundle exec spring binstub --all
     $ bin/spring stop
    

    I tried this, then re-running my app with rails s. That didn't work so then try closing the terminal completely and rebooting your computer. Run rails s and try testing with rails c in a second tab:

     mail = UserMailer.mailer(User.last)
    

    That finally worked for me, hopefully it'll help some of you!

    (Some of these steps may be redundant.)

提交回复
热议问题