Note that there are some explanatory texts on larger screens.

plurals
  1. POWrong number of arguments error with TestMailer
    text
    copied!<p>I'm running a strange problem sending emails. I'm getting this exception:</p> <pre><code>ArgumentError (wrong number of arguments (1 for 0)): /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:642:in `initialize' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:642:in `new' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:642:in `create' /usr/lib/ruby/gems/1.8/gems/ar_mailer-1.3.1/lib/action_mailer/ar_mailer.rb:92:in `perform_delivery_activerecord' /usr/lib/ruby/gems/1.8/gems/ar_mailer-1.3.1/lib/action_mailer/ar_mailer.rb:91:in `each' /usr/lib/ruby/gems/1.8/gems/ar_mailer-1.3.1/lib/action_mailer/ar_mailer.rb:91:in `perform_delivery_activerecord' /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.1/lib/action_mailer/base.rb:508:in `__send__' /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.1/lib/action_mailer/base.rb:508:in `deliver!' /usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.1/lib/action_mailer/base.rb:383:in `method_missing' /app/controllers/web_reservations_controller.rb:29:in `test_email' </code></pre> <p>In my web_reservations_controller I have a simply method calling </p> <pre><code>TestMailer.deliver_send_email </code></pre> <p>And my TesMailer is something like:</p> <pre><code>class TestMailer &lt; ActionMailer::ARMailer def send_email @recipients = "xxx@example.com" @from = "xxx@example.com" @subject = "TEST MAIL SUBJECT" @body = "&lt;br&gt;TEST MAIL MESSAGE" @content_type = "text/html" end end </code></pre> <p>Do you have any idea?</p> <p>Thanks! Roberto</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload