运行 rails g rolify 时出错
Error when running rails g rolify
我用 rails destroy model <model_name>
破坏了我的用户和角色模型并尝试 运行 rails g rolify Role User
,但我收到错误
/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)
伴随着其他信息的大量反流。我需要做什么来解决这个问题?
您的 User
model/class 需要存在。
我用 rails destroy model <model_name>
破坏了我的用户和角色模型并尝试 运行 rails g rolify Role User
,但我收到错误
/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)
伴随着其他信息的大量反流。我需要做什么来解决这个问题?
您的 User
model/class 需要存在。