Rails 4 + Devise:无效的路由名称,已在使用中

Rub*_*nez 24 ruby ruby-on-rails devise

我正在按照这个方法在注册成功后修改确认页面.

https://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-on-successful-sign-up-(registration)

我做的一切都像它说的但我得到这个错误:

in `add_route': Invalid route name, already in use: 'new_user_session'  (ArgumentError)
You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here: 
http://guides.rubyonrails.org/routing.html#restricting-the-routes-created
Run Code Online (Sandbox Code Playgroud)

我想wiki没有更新使用Devise with Rails 4,但我没有找到足够的信息来修复错误.

返回错误的行是next(routes.rb):

devise_for :users, :controllers => { :registrations => "registrations" }
Run Code Online (Sandbox Code Playgroud)

有什么建议吗?

谢谢.

编辑 -

registrations_controller.rb

class RegistrationsController < Devise::RegistrationsController

    protected

    def after_inactive_sign_up_path_for(resource)
        '/sign_up/inactive'
    end
end
Run Code Online (Sandbox Code Playgroud)

的routes.rb

root :to => 'home#index'
devise_for :users
resources :users

devise_for :users, :controllers => { :registrations => "registrations" }
Run Code Online (Sandbox Code Playgroud)

sev*_*cat 57

devise_for :users的routes.rb中有两条路线- 删除第一条路线.