ArgumentError - Invalid route name, already in use: 'root'
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.
The issue is this suggested code:
authenticated :user do
root :to => 'users#index'
end
root :to => 'home#index'
I got my routes working by adding a named route:
authenticated :user do
root :to => 'users#index', as: :authenticated_root
end
root :to => 'home#index'
There is a change in Rails 4 which has been acknowledged by the core team:
heartcombo/devise#2393