Ralf17 Ralf17 - 1 year ago 86
Ruby Question

Unknown key: :order in Mailboxer Gem

I am currently trying to use the Mailboxer Gem. I have added the following line in my Gemfile:

gem "mailboxer"

In the konsole I did these:

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

and have added
in my user.rb. However, I am getting this error

enter image description here

I tried replacing the gem in Gemfile from
gem 'mailboxer''
gem 'mailboxer', github: 'mailboxer/mailboxer'
but I get this message when I bundle install

git://github.com/mailboxer/mailboxer.git (at master@0e41d6a) is not yet checked out. Run `bundle install` first.

How can I fix this and make the mailboxer work in my rails application?

Answer Source

I figured out that I should add the following methods in user.rb besides the line acts_as_messageable:


  def name 

  def mailboxer_email(object)

I used the following for the Gemfile:

gem 'mailboxer', '~> 0.14.0'

The two errors I had from previous tries are now gone.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download