Can't generate cancan:ability

南笙酒味 提交于 2019-12-12 03:55:55

问题


In ruby on rails gemfile i added gem 'cancancan', '~> 1.10', then ran bundle install and after that rails g cancan:ability.

This is what i get in my console

Running via Spring preloader in process 3455
Expected string default value for '--test-framework'; got false (boolean)
Expected string default value for '--jbuilder'; got true (boolean)
Expected boolean default value for '--markerb'; got :erb (string)
Expected string default value for '--test-framework'; got false (boolean)
Expected string default value for '--test-framework'; got false (boolean)
Expected string default value for '--helper'; got true (boolean)
Expected string default value for '--assets'; got true (boolean)
Expected string default value for '--test-framework'; got false (boolean)
Expected string default value for '--test-framework'; got false (boolean)
Expected string default value for '--test-framework'; got false (boolean)
Expected string default value for '--test-framework'; got false (boolean)
Could not find generator 'cancan:ability'. Maybe you meant 'channel', 'coffee:assets' or 'css:assets'
Run `rails generate --help` for more options.

回答1:


Runned 'spring stop' command and problem solved.



来源:https://stackoverflow.com/questions/41683981/cant-generate-cancanability

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!