Ruby: how to uninstall Devise?

后端 未结 5 1322
广开言路
广开言路 2020-12-07 12:05

I have installed Devise and now want to remove it, including all the files it has generated. How do I do that?

5条回答
  •  北海茫月
    2020-12-07 13:06

    This worked for me!

    1: rails d devise User This deletes the model and the routes.

    2: rails d devise:install , This destroys devise.rb and devise.en.yml files.

    3: create a migration eg: rails g migration drop_user_table. I used drop_table :users , force: :cascade, force: :cascade; takes care of

    PG::DependentObjectsStillExist: ERROR:

    that occurs if other tables depend on the user table.

提交回复
热议问题