Gem的模型遗失了

我在我的Rails 4应用程序中使用邮箱 。

gem 'mailboxer' 

我最近将它从0.11更新到0.12.4 ,它停止工作,我无法找出原因。 现在,我收到错误:

 uninitialized constant Message 

我检查了gem的GitHub repo ,它确实有Message模型。

我检查了我的本地版本的gem,它匹配。

 Puma:mailboxer Jeff$ pwd /Users/Jeff/.rvm/gems/ruby-2.0.0-p247/gems/mailboxer-0.12.4/app/models/mailboxer Puma:mailboxer Jeff$ ls conversation conversation.rb mailbox.rb message.rb notification.rb receipt.rb 

为什么我的应用程序找不到该模型? 我该如何解决?

Message现在被命名为Mailboxer::Message 。 根据升级文档 ,从0.11升级到0.12时还需要执行几个步骤:

 rails generate mailboxer:namespacing_compatibility rails generate mailboxer:install -s rake db:migrate