Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 3 关于Heroku不';不能通过参数吗?_Ruby On Rails 3_Methods_Heroku_Params - Fatal编程技术网

Ruby on rails 3 关于Heroku不';不能通过参数吗?

Ruby on rails 3 关于Heroku不';不能通过参数吗?,ruby-on-rails-3,methods,heroku,params,Ruby On Rails 3,Methods,Heroku,Params,我有一个简单的方法: def my_method ...here I am working with "params" MyMailer.send_email_to_user(params).deliver end 在Heroku上,未将ruby变量params中的参数传递给方法send\u email\u to\u user。但是在调用向用户发送电子邮件之前我正在处理参数中存储的数据,没有任何问题 但是当我尝试将它们传递给mailer的方法时,我会得到错误 在localhost上,此

我有一个简单的方法:

def my_method
  ...here I am working with "params"
  MyMailer.send_email_to_user(params).deliver
end
在Heroku上,未将ruby变量
params
中的参数传递给方法
send\u email\u to\u user
。但是在调用
向用户发送电子邮件之前
我正在处理
参数中存储的数据,没有任何问题

但是当我尝试将它们传递给mailer的方法时,我会得到错误

在localhost上,此流可以正确工作,但在Heroku上则不行。有没有人会遇到同样的问题,或者有人会提供帮助,如何解决


谢谢

试着在本地生产模式下运行这个(
rails server-e production
),看看它是否还能工作

另外,请确保您的应用程序(例如)附带了一个电子邮件加载项,因为Heroku不直接提供任何SMTP服务