4

Edit!

I set up the rolify gem and bundle my app:

I added:

gem "rolify" #to add roles like admin and member to the users

to the gemfile and then ran

bundle install

when i try to run

rails g rolify Role User

I get

Could not find generator rolify.

Google didn't bring up anything

Any ideas?

4

3 回答 3

12

必须添加 git 存储库才能使其工作:

gem "rolify",        :git => "git://github.com/EppO/rolify.git"
于 2013-03-18T18:48:42.020 回答
7

我在 Rails 4.0.0.rc1 和 Rolify 3.2.0 上,我不得不运行rails g rolify:role Role User而不是rails g rolify Role User.

于 2013-05-17T15:28:16.307 回答
5

如此处所述您可以使用rails g rolify:role.

于 2013-04-24T14:49:01.953 回答