RailsApps / rails3-devise-rspec-cucumber

An example Rails 3.2 app with Devise and RSpec and Cucumber.
http://railsapps.github.io/
445 stars 144 forks source link

`add_route': Invalid route name, already in use: 'root' #50

Closed AlexVPopov closed 6 years ago

AlexVPopov commented 11 years ago

This code:

authenticated :user do
  root :to => 'home#index'
end
root :to => "home#index"
devise_for :users

part of section: Create a Home Controller and View causes this error:

`add_route': Invalid route name, already in use: 'root'

When I remove one of the root :to lines, the code works. Probably a Rails 4 issue?

AlexVPopov commented 11 years ago

O.K., this is a known issue, but you can use this fix.

ashishra0 commented 6 years ago

Where is that code file?

schadenfred commented 6 years ago

config/routes.rb

AlexVPopov commented 6 years ago

As mentioned, there's a fix for this, so I'm closing the issue.