ArgumentError: неверное имя маршрута, уже используется: 'root' из-за того, что маршруты rails инициализируются дважды
Мой конфиг /rout.rb вызывается дважды. что приводит к ошибке, когда я делаю рейк-маршруты. Приложение также не инициализируется. Я пытаюсь перейти на Rails 4.1.7 с Rails 3.2.13. Ниже приведен код в моем файле config/rout.rb:
Rails.application.routes.draw do
puts "hello world!"
puts caller
root to: "home#index"
end
Вывод команды рейка маршрутов:
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)
1 ответ
Решение
Проблема была в том, что routs.rb вызывался дважды. Однажды во время инициализации приложения в application.rb, а затем мне вручную потребовался инициализатор в конце application.rb, который вызывал инициализацию приложения дважды.