Devise: undefined method `new_registration_path' in rails 3.1 and devise 1.4.7

Created on 1 Oct 2011  路  12Comments  路  Source: heartcombo/devise

In older versions i see this issue, but now in devise version 1.4.7 it's again.

NoMethodError in Devise/sessions#new

Showing /usr/local/lib/ruby/gems/1.9.1/gems/devise-1.4.7/app/views/devise/shared/_links.erb where line #6 raised:

undefined method `new_registration_path' for #<#Class:0xb3c20ebc:0xb3c1b14c>

Extracted source (around line #6):

3: <% end -%>
4:
5: <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6: <%= link_to "Sign up", new_registration_path(resource_name) %>

7: <% end -%>
8:
9: <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>

Most helpful comment

Restart your server- I think it's because you changed the routes. (Worked for me!)

All 12 comments

Thanks for opening the issue. Can you provide a sample app that reproduces the issue?

If i understand right -> https://github.com/Keardo/app1

I had this exact some issue. I think creating my own controllers and doing rails generate devise:views MyModelName solved it.

It works fine in the app you provided:

Started GET "/admin/login" for 127.0.0.1 at 2011-10-09 11:35:52 +0200
Processing by ActiveAdmin::Devise::SessionsController#new as HTML
Rendered /Users/jose/.rvm/gems/ruby-1.9.2-p180/gems/devise-1.4.7/app/views/devise/shared/_links.erb (0.5ms)
Rendered /Users/jose/.rvm/gems/ruby-1.9.2-p180/gems/activeadmin-0.3.2/app/views/active_admin/devise/sessions/new.html.erb within layouts/active_admin_logged_out (5.9ms)
Completed 200 OK in 21ms (Views: 9.2ms | ActiveRecord: 0.5ms)

Restart your server- I think it's because you changed the routes. (Worked for me!)

For me as well.

Restart the server, yes!

Restarting worked for me too!

Thanks!

Thanks,
Restart worked.

Thanks,
I was struggling with that,

yeah! restart worked!

thanks,it worked forme as too

Was this page helpful?
0 / 5 - 0 ratings