我运行 bundle exec rspec spec/的时候terminal给我了下面的error信息, 跪求大神们来分析一下是哪里出了问题
CalebdeMacBook-Pro:sample_app Caleb$ bundle exec rspec spec/
/Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:434:in add_route': Invalid route name, already in use: 'root' (ArgumentError)
You may have defined two routes with the same name using the
:asoption, 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
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_dispatch/routing/mapper.rb:1445:in add_route'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_dispatch/routing/mapper.rb:1422:in
decomposed_match'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_dispatch/routing/mapper.rb:1403:in block in match'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_dispatch/routing/mapper.rb:1394:in
each'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_dispatch/routing/mapper.rb:1394:in match'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_dispatch/routing/mapper.rb:330:in
root'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_dispatch/routing/mapper.rb:1464:in root'
from /Users/Caleb/rubyonrails/sample_app/config/routes.rb:13:in
block in '
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:341:in instance_exec'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:341:in
eval_block'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:319:in draw'
from /Users/Caleb/rubyonrails/sample_app/config/routes.rb:1:in
'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:223:in load'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:223:in
block in load'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in load_dependency'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:223:in
load'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:40:in block in load_paths'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:40:in
each'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:40:in load_paths'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:16:in
reload!'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:26:in block in updater'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/file_update_checker.rb:75:in
call'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.3/lib/active_support/file_update_checker.rb:75:in execute'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:27:in
updater'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/application/routes_reloader.rb:6:in execute_if_updated'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/application/finisher.rb:69:in
block in module:Finisher'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/initializable.rb:30:in instance_exec'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/initializable.rb:30:in
run'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/initializable.rb:55:in block in run_initializers'
from /Users/Caleb/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:150:in
block in tsort_each'
from /Users/Caleb/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:183:in block (2 levels) in each_strongly_connected_component'
from /Users/Caleb/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:219:in
each_strongly_connected_component_from'
from /Users/Caleb/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:182:in block in each_strongly_connected_component'
from /Users/Caleb/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:180:in
each'
from /Users/Caleb/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:180:in each_strongly_connected_component'
from /Users/Caleb/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tsort.rb:148:in
tsort_each'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/initializable.rb:54:in run_initializers'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/application.rb:215:in
initialize!'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.3/lib/rails/railtie/configurable.rb:30:in method_missing'
from /Users/Caleb/rubyonrails/sample_app/config/environment.rb:5:in
'
from /Users/Caleb/rubyonrails/sample_app/spec/spec_helper.rb:3:in require'
from /Users/Caleb/rubyonrails/sample_app/spec/spec_helper.rb:3:in
'
from /Users/Caleb/rubyonrails/sample_app/spec/models/event_spec.rb:1:in require'
from /Users/Caleb/rubyonrails/sample_app/spec/models/event_spec.rb:1:in
'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in load'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in
block in load_spec_files'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in each'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in
load_spec_files'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in run'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in
run'
from /Users/Caleb/.rvm/gems/ruby-2.0.0-p353/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'