Ruby on rails 3 rails中的名称空间actionmailer
我的应用程序中有一个名为“storyed”的名称空间 我的邮件文件夹中有一个Ruby on rails 3 rails中的名称空间actionmailer,ruby-on-rails-3,Ruby On Rails 3,我的应用程序中有一个名为“storyed”的名称空间 我的邮件文件夹中有一个storyed\u contact\u mailer,在视图文件夹中的storyed文件夹中有邮件的视图 My contacts controller位于命名空间中,其定义如下:class Storyed::StoryedContacts controller
storyed\u contact\u mailer
,在视图文件夹中的storyed
文件夹中有邮件的视图
My contacts controller位于命名空间中,其定义如下:class Storyed::StoryedContacts controller
,在Storyed\u contact\u mailer中调用deliver方法。它在开发中起作用
在生产过程中,我在Heroku上遇到了这个错误,我无法理解:
> NameError (uninitialized constant
> Storyed::StoryedContactsController::StoryedContactMailer):
> 2012-02-04T05:32:35+00:00 app[web.1]:
> app/controllers/storyed/storyed_contacts_controller.rb:12:in `block in
> create' 2012-02-04T05:32:35+00:00 app[web.1]:
> 2012-02-04T05:32:35+00:00 app[web.1]: 2012-02-04T05:32:35+00:00
> app[web.1]:
> app/controllers/storyed/storyed_contacts_controller.rb:10:in `create'
我曾经在mailers文件夹中的一个有故事的文件夹中放置了
有故事的\u contact\u mailer
,但它仍然不起作用。你知道这在生产中失败的原因吗?根本不给邮件命名“删除有故事的部分”解决了这个问题