[英]Error while trying to setup active_admin
I was trying to setup active admin, and somehow managed to mess up one of the steps. 我正在尝试设置活动管理员,并以某种方式设法弄乱了其中一个步骤。 After running the rails g active_admin:install, I raked the database, then started the rails server. 在运行rails g active_admin:install之后,我倾斜了数据库,然后启动了rails服务器。 When I navigate to localhost:3000/admin I receive the following error. 当我导航到localhost:3000 / admin时,出现以下错误。
NoMethodError in Active_admin/devise/sessions#new
undefined method `new_password_path' for #<#<Class:0x10347f280>:0x103148210>
Extracted source (around line #10):
7: <% end -%>
8:
9: <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
10: <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
11: <% end -%>
12:
13: <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
Any ideas on how to fix this? 有想法该怎么解决这个吗? Or how to completely remove active admin(delete files, undo migrations, undo changes to other files) and start over with a clean slate? 还是如何完全删除活动的admin(删除文件,撤消迁移,撤消对其他文件的更改)并重新开始? I am using rails 3.0.9. 我正在使用Rails 3.0.9。 Thanks! 谢谢!
Devise routes must always be created inside your config/routes.rb
file. 设计路线必须始终在config/routes.rb
文件中创建。
You can add devise_for :users
or devise_for :name
for a custom name you create, like admin or moderator... 您可以为您创建的自定义名称添加devise_for :users
或devise_for :name
,例如admin或主持人...
It looks like you didn't add devise to routes. 您似乎没有为路线添加设计。 You should add something like: 您应该添加类似以下内容:
devise_for :users
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.