2016-10-16 36 views
0

我目前正在嘗試使用郵箱寶石。我已經添加了下面一行在我的Gemfile:未知鍵:在郵箱中訂購寶石

gem "mailboxer" 

在konsole中我做了這些:

$ bundle install 
$ rails g mailboxer:install 
$ rake db:migrate 
$ rails g mailboxer:views 

,並在我的user.rb.添加acts_as_messageable不過,我收到此錯誤

enter image description here

我試圖從gem 'mailboxer''更換寶石的Gemfile以gem 'mailboxer', github: 'mailboxer/mailboxer'但是當我捆綁安裝

git://github.com/mailboxer/mailboxer.git (at [email protected]) is not yet checked out. Run `bundle install` first. 

我怎樣才能解決這個問題,讓我得到這個消息郵箱工作在我的rails應用程序中?

回答

0

我想通了,我應該在user.rb添加下面的方法除了線acts_as_messageable

acts_as_messageable 

    def name 
    self.name 
    end 

    def mailboxer_email(object) 
    nil 
    end 

的Gemfile中我使用了以下內容:

gem 'mailboxer', '~> 0.14.0' 

兩個錯誤,我有從以前的嘗試現在沒有了。