If you are using rolify gem
maybe you added rolify to your Gemfile like this this:
source 'https://rubygems.org' gem 'rolify', '~> 5.1.0'
Then you created your Role model and migration file using this generator:
$ rails g rolify Role User
Then you had run migrations:
$ rake db:migrate
Then if you go to your User model you have had seen something like:
class User < ActiveRecord::Base rolify end
After that, you try to reload your browser then you experimented this error:
Undefined local variable or method 'rolify'
Restart rails server then you have fixed it!