Search code examples
rubyruby-on-rails-3private-messaging

how to solve undefined local variable or method `has_mailbox'?


I am following this tutorial to add messaging functionality between the users in my rails app, but got an error in my User model.

class User < ActiveRecord::Base
  has_mailbox
end

This gives me the following error:

undefined local variable or method `has_mailbox' for #<Class:0xb60f6f84>

Any ideas?


Solution

  • I've checked this gem, try to run

    rails g has_mailbox:install
    

    when you install any gem in rails app, the good idea is to check generators available

    rails g //list of available generators