我的config / routes.rb被调用两次。当我做rake路线时导致错误。应用程序也没有初始化。我试图从Rails 3.2.13升级到Rails 4.1.7。以下是我的config / routes.rb文件中的代码:
Rails.application.routes.draw do
puts "hello world!"
puts caller
root to: "home#index"
end
输出 rake routes 命令:
hello world!
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/route_set.rb:337:in `instance_exec'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/route_set.rb:337:in `eval_block'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/route_set.rb:315:in `draw'
/Users/svisamsetty/Documents/projects/groovepacker/groovepacker_11_14/config/routes.rb:1:in `<top (required)>'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:241:in `load'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:241:in `block in load'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:241:in `load'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:40:in `each'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:16:in `reload!'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/file_update_checker.rb:75:in `call'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/file_update_checker.rb:75:in `execute'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:27:in `updater'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/finisher.rb:71:in `block in <module:Finisher>'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/initializable.rb:30:in `instance_exec'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/initializable.rb:30:in `run'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in `each'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in `call'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/initializable.rb:54:in `run_initializers'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application.rb:300:in `initialize!'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/railtie.rb:194:in `public_send'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/railtie.rb:194:in `method_missing'
/Users/svisamsetty/Documents/projects/groovepacker/groovepacker_11_14/config/environment.rb:5:in `<top (required)>'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `block in require'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application.rb:276:in `require_environment!'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application.rb:389:in `block in run_tasks_blocks'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:199:in `each'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:199:in `invoke_prerequisites'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/bin/rake:23:in `load'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/bin/rake:23:in `<main>'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'
hello world!
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/route_set.rb:337:in `instance_exec'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/route_set.rb:337:in `eval_block'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/route_set.rb:315:in `draw'
/Users/svisamsetty/Documents/projects/groovepacker/groovepacker_11_14/config/routes.rb:1:in `<top (required)>'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:241:in `load'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:241:in `block in load'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:241:in `load'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:40:in `each'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:16:in `reload!'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/file_update_checker.rb:75:in `call'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/file_update_checker.rb:75:in `execute'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:27:in `updater'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/finisher.rb:71:in `block in <module:Finisher>'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/initializable.rb:30:in `instance_exec'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/initializable.rb:30:in `run'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in `each'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in `call'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/initializable.rb:54:in `run_initializers'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application.rb:300:in `initialize!'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/railtie.rb:194:in `public_send'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/railtie.rb:194:in `method_missing'
/Users/svisamsetty/Documents/projects/groovepacker/groovepacker_11_14/config/environment.rb:5:in `<top (required)>'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `block in require'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application.rb:276:in `require_environment!'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application.rb:389:in `block in run_tasks_blocks'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:199:in `each'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:199:in `invoke_prerequisites'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3@global/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/bin/rake:23:in `load'
/Users/svisamsetty/.rvm/rubies/ruby-2.1.3/bin/rake:23:in `<main>'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'
rake aborted!
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. For the latter, you can restrict the routes created with `resources` as explained here:
http://guides.rubyonrails.org/routing.html#restricting-the-routes-created
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/route_set.rb:430:in `add_route'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/mapper.rb:1495:in `add_route'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/mapper.rb:1472:in `decomposed_match'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/mapper.rb:1453:in `block in match'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/mapper.rb:1443:in `each'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/mapper.rb:1443:in `match'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/mapper.rb:340:in `root'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/mapper.rb:1514:in `root'
/Users/svisamsetty/Documents/projects/groovepacker/groovepacker_11_14/config/routes.rb:6:in `block in <top (required)>'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/route_set.rb:337:in `instance_exec'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/route_set.rb:337:in `eval_block'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/actionpack-4.1.7/lib/action_dispatch/routing/route_set.rb:315:in `draw'
/Users/svisamsetty/Documents/projects/groovepacker/groovepacker_11_14/config/routes.rb:1:in `<top (required)>'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:241:in `load'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:241:in `block in load'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:241:in `load'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:40:in `each'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:16:in `reload!'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/file_update_checker.rb:75:in `call'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/file_update_checker.rb:75:in `execute'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:27:in `updater'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application/finisher.rb:71:in `block in <module:Finisher>'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/initializable.rb:30:in `instance_exec'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/initializable.rb:30:in `run'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/initializable.rb:54:in `run_initializers'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application.rb:300:in `initialize!'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/railtie.rb:194:in `public_send'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/railtie.rb:194:in `method_missing'
/Users/svisamsetty/Documents/projects/groovepacker/groovepacker_11_14/config/environment.rb:5:in `<top (required)>'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `block in require'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application.rb:276:in `require_environment!'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/gems/railties-4.1.7/lib/rails/application.rb:389:in `block in run_tasks_blocks'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
/Users/svisamsetty/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => routes => environment
(See full trace by running task with --trace)
答案 0 :(得分:1)
问题是因为routes.rb被调用了两次。在application.rb中的应用程序初始化期间,然后我在application.rb的末尾手动需要一个初始化程序,这导致应用程序初始化两次。