Search code examples
ruby-on-railsrolify

Error when running rails g rolify


I destroyed my User and Role models with rails destroy model <model_name> and tried to run rails g rolify Role User, but I am getting the error

/usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.2.2/lib/active_support/inflector/methods.rb:261:in `const_get': uninitialized constant User (NameError)

Along with a big regurgitation of other information. What do I need to do to fix this?


Solution

  • Your User model/class needs to exist.