Rolify에 문제가 있습니다. 내가 명령 레이크 DB를 사용하는 경우 : 여기 내 코드는 Rolify 내 모델에서Ruby on rails rake db : reseed abort
undefined local variable or method `rolify' for Customer:Class
의 : 쉘에 다시 시드, 내 데이터베이스를 재설정 나는이 오류가 그 이유를 알고 있다면
class Customer
include Mongoid::Document
include Mongoid::Timestamps
rolify
embeds_one :contact
has_many :orders
devise :database_authenticatable, :recoverable, :registerable, :timeoutable, :validatable,
:token_authenticatable, :confirmable
attr_accessible :email, :password, :password_confirmation, :add_role
field :first_name
field :last_name
field :password
field :gender
field :confirmed_at
field :unconfirmed_email
field :confirmation_url
field :confirmation_token
field :confirmation_sent_at
field :email
field :encrypted_password
gender_regex = /^(Male|Female)$/
validates :first_name, presence: true, :allow_blank => true
validates :last_name, presence: true, :allow_blank => true
validates :password, presence: true
validates :gender, presence: true, :allow_blank => true,
format: { with: gender_regex }
end
을, 도와주세요 :)
'rolify'명령이란 무엇입니까? 그것이 무엇이고 어디서 왔는가? –
롤을 유지하기위한 것입니다. https://github.com/EppO/rolify – user967001