Open tardate opened 14 years ago
Testing a migration on a very small/simple 2.3.5 site, rake rails:upgrade:routes fails with map.root in the routes file, e.g.
map.root :articles
Commenting this out, routes generation is ok.
$ rake rails:upgrade:routes --trace (in /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample) * Invoke rails:upgrade:routes (first_time) * Execute rails:upgrade:routes rake aborted! undefined method []' for :articles:Symbol /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:237:into_route_code' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:337:in generate' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:336:inmap' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:336:in generate' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:51:inupgrade_routes' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:28:in generate_new_routes' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/rails_upgrade_tasks.rake:28 /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:636:incall' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:636:in execute' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:631:ineach' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:631:in execute' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain' /Users/paulgallagher/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/monitor.rb:242:in synchronize' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:583:in invoke' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2029:ineach' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2023:in top_level' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2001:inrun' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:1998:inrun' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/bin/rake:31 /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/bin/rake:19:in `load' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/bin/rake:19
[]' for :articles:Symbol /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:237:in
generate' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:336:in
generate' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:51:in
generate_new_routes' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/rails_upgrade_tasks.rake:28 /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:636:in
execute' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:631:in
execute' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:597:in
synchronize' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:590:in
invoke' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2051:in
top_level' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2068:in
top_level' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2001:in
standard_exception_handling' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:1998:in
Having the same problem.
I am too when using:
map.root :homepage
Testing a migration on a very small/simple 2.3.5 site, rake rails:upgrade:routes fails with map.root in the routes file, e.g.
map.root :articles
Commenting this out, routes generation is ok.
$ rake rails:upgrade:routes --trace (in /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample) * Invoke rails:upgrade:routes (first_time) * Execute rails:upgrade:routes rake aborted! undefined method
[]' for :articles:Symbol /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:237:in
to_route_code' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:337:ingenerate' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:336:in
map' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:336:ingenerate' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:51:in
upgrade_routes' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:28:ingenerate_new_routes' /Users/paulgallagher/MyGithub/heroku/rails-authlogic-rpx-sample/vendor/plugins/rails_upgrade/lib/tasks/rails_upgrade_tasks.rake:28 /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:636:in
call' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:636:inexecute' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:631:in
each' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:631:inexecute' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with_call_chain' /Users/paulgallagher/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/monitor.rb:242:insynchronize' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:583:ininvoke' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2051:in
invoke_task' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2029:intop_level' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2029:in
each' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2029:intop_level' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2023:intop_level' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2001:in
run' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/lib/rake.rb:1998:in
run' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/gems/rake-0.8.7/bin/rake:31 /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/bin/rake:19:in `load' /Users/paulgallagher/.rvm/gems/ruby-1.8.7-p302@rails235/bin/rake:19