getting error from devise “User does not respond to 'devise' method” when running “rails generate devise:install”

前端 未结 4 937
星月不相逢
星月不相逢 2021-02-09 07:10

I\'m getting error from devise \"User does not respond to \'devise\' method\" when running \"rails generate devise:install\". Ideas re how to resolve?

In fact also get

4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-09 07:37

    Completing a tutorial for rails & these answers didn't work for me, but after some searching found a solution. Hope this helps anyone else who's new and running into this issue.

    1. Go to: config/routes.rb file
    2. Comment out the line devise_for :installs (put a hash tag in front)
    3. Go to your Ruby terminal and re-enter: rails generate devise:install

    Now Devise should install properly & subsequent errors should be gone.

    Source

提交回复
热议问题