简体   繁体   中英

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. When I navigate to localhost:3000/admin I receive the following error.

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? I am using rails 3.0.9. Thanks!

Devise routes must always be created inside your config/routes.rb file.

You can add devise_for :users or devise_for :name for a custom name you create, like admin or moderator...

It looks like you didn't add devise to routes. You should add something like:

devise_for :users

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM