gpt4 book ai didi

ruby-on-rails - 由于此警告 : [WARNING] You provided devise_for :users but there is no model User defined in your application,设计无法正常工作

转载 作者:行者123 更新时间:2023-12-04 07:31:11 25 4
gpt4 key购买 nike

我刚刚向 rails 应用程序添加了全新安装的设计,但它在启动服务器启动时输出警告,并且设计根本无法工作:

   [WARNING] You provided devise_for :users but there is no model User defined in your application

我 100% 确实有一个称为用户的模型。

我看过其他有这个问题的人有这个( Heroku [WARNING] You provided devise_for :users but there is no model User defined in your application ),我已经更改了“:database_authenticable”的名称。这并没有解决它。

此外,设计初始值设定项设置为事件记录,这是另一个有此错误的错误(需要 'devise/orm/active_record'),但这也没有修复它。

有没有其他人有这个错误,或者有什么方法可以追踪它以获取更多详细信息?谢谢。

最佳答案

我认为如果您的 route 有 devise_for :users 它将针对您的用户模型(单数)。你说你的模型的名字是用户,这可能使它不起作用。

关于ruby-on-rails - 由于此警告 : [WARNING] You provided devise_for :users but there is no model User defined in your application,设计无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19858840/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com