Skip to content

Devise.router_name is nil #1648

Closed
alecguintu opened this Issue Feb 15, 2012 · 4 comments

2 participants

@alecguintu

I kinda upgraded to 2.0.1 and when I register, the Devise.router_name is nil.

nil is not a symbol
/Users/Lec/.rvm/gems/ruby-1.9.3-p0@surescene/gems/devise-2.0.1/lib/devise/controllers/url_helpers.rb:65:in `_devise_route_context'
/Users/Lec/.rvm/gems/ruby-1.9.3-p0@surescene/gems/devise-2.0.1/lib/devise/controllers/url_helpers.rb:50:in `confirmation_url'
/Users/Lec/Sites/surescene3/app/views/devise/mailer/confirmation_instructions.html.erb:6:in `_app_views_devise_mailer_confirmation_instructions_html_erb___4589409742918287286_2481257540'

For now, I added a config.router_name = :main_app in the initializers/devise.rb but I'm wondering if that is also a step at upgrading to 2.0.1

@josevalim
Plataformatec member

This should not be required. Devise should set it automatically, how can we reproduce the issue? Thanks for the report.

@alecguintu

My code was in a previous devise 1.x. And I upgraded to 2.0.1. I followed the instructions on the upgrading to 2.0, specifically changed stuff on yml and added fields on user.rb. And I run rake (w/c registers a user) and that showed up.

@josevalim
Plataformatec member
@alecguintu

No prob! Oh and I meant to write there rake db:seed.

@josevalim josevalim closed this in 27a83f3 Feb 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.