Ruby on rails 3 ActionMailer不执行任何操作,设置正确

Ruby on rails 3 ActionMailer不执行任何操作,设置正确,ruby-on-rails-3,actionmailer,Ruby On Rails 3,Actionmailer,在development.rb中,我有以下ActionMailer设置: config.action_mailer.default_url_options = { :host => 'localhost:3000' } config.action_mailer.delivery_method = :smtp config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors =

development.rb
中,我有以下ActionMailer设置:

config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default :charset => "utf-8"
config.action_mailer.smtp_settings = {
  address: "smtp.gmail.com",
  port: 587,
  domain: "gmail.com",
  authentication: "plain",
  enable_starttls_auto: true,
  user_name: "username@gmail.com",
  password: "password"
}
notifier.rb
(我的邮件)中,我有以下定义:

def user_email(user)
  @user = User.find(user)
  mail(:to => user.email, :subject => "Welcome to me.")
end

def test_email
  mail(:to => "here@there.com", :subject => "Test mail", :body => "Ain't I shapely?")
end
在控制台中运行
Notifier.test\u email.deliver
会给我以下信息:
参数数量错误(0代表1)

在控制台中运行
Notifier.user\u email(2.deliver)
会给我以下信息:
通知程序的未定义方法“user\u email”:Class


我是不是错过了一些显而易见的东西?Gmail的设置都是正确的,但问题显然在这之前。

重启服务器修复了它。胡说八道