小编Pet*_*sam的帖子

UserMailer with Devise

我正在使用我的自定义邮件程序UserMailer发送电子邮件.它在开发中工作得很完美,但在生产中我得到错误500,就是在我忘记时检索密码的时候.

这是生产模式中生产日志中的内容

  Processing by Devise::PasswordsController#create as HTML
  Parameters: {"utf8"=>"?","authenticity_token"=>"xxxxxxxxxxxxxxx", "user"=>{"email"=>"sam@gmail.com"}, "commit"=>"Send me r$
 Completed 500 Internal Server Error in 2ms

 NameError (uninitialized constant Devise::UserMailer):
  activesupport (3.2.8) lib/active_support/inflector/methods.rb:230:in `block in  constantize'
activesupport (3.2.8) lib/active_support/inflector/methods.rb:229:in `each'
activesupport (3.2.8) lib/active_support/inflector/methods.rb:229:in `constantize'
devise (2.1.2) lib/devise.rb:256:in `get'
devise (2.1.2) lib/devise.rb:279:in `mailer'
Run Code Online (Sandbox Code Playgroud)

我的邮件配置.user_mailer.rb

 class UserMailer < Devise::Mailer 

  default :from => "info@xxxxxxxx.com"  

 def signup_confirmation(user)
   @user = user
   mail :to => user.email, :subject=> "Thank you for signing with us"
end

# send password reset instructions

def reset_password_instructions(user)
  @resource …
Run Code Online (Sandbox Code Playgroud)

actionmailer mailer devise ruby-on-rails-3 ruby-on-rails-3.2

1
推荐指数
1
解决办法
4011
查看次数

编写以下php echo命令的正确方法是什么

请有人帮我说这个.我对php一无所知

echo bowob_api_get_code(/* BOWOB_APP_ID */, /* BOWOB_SERVER_ADDRESS */);
Run Code Online (Sandbox Code Playgroud)

我应该替换值BOWOB_APP_ID with somevalue 67890BOWOB_SERVER with http://euwest1.bowobcloud1.com/

我做了如下所示,但我一直在这条线上得到错误

echo bowob_api_get_code('67890, http://euwest1.bowobcloud1.com/ ');
Run Code Online (Sandbox Code Playgroud)

php chat echo

-2
推荐指数
1
解决办法
55
查看次数