Upgrade rails 2.3.9 do 3.0.3 (rails_upgrade)

Cześć,

Mam problem z automatycznym upgradem pliku routes.rb z pomocą plugina rails_upgrade. Ciągle męczy mnie błąd: undefined method `now' for nil:NilClass
Kroki, które do tej pory poczyniłem:

  1. Instalacja rails_upgrade [ok]

  2. rake rails:upgrade:backup [ok]

  3. rake rails:upgrade:check [ok]

  4. Instalacja rails 3.0.3 w tym samym katalogu

  5. rake rails:upgrade:configuration [ok] (przekleiłem zawartnośc environment.rb do application.rb bez wpisów o gemach)

  6. rake rails:upgrade:gems [ok]

  7. rake rails:upgrade:routes [failed]
    Błąd + trace:

chmarus@Arti:~/Pulpit/mmo$ rake rails:upgrade:routes --trace WARNING: Global access to Rake DSL methods is deprecated. Please include ... Rake::DSL into classes and modules which use the Rake DSL methods. WARNING: DSL method Mmo::Application#task called at /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/railties-3.0.3/lib/rails/application.rb:214:in `initialize_tasks' ** Invoke rails:upgrade:routes (first_time) ** Execute rails:upgrade:routes rake aborted! undefined method `now' for nil:NilClass /home/chmarus/Pulpit/mmo/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:47:in `upgrade_routes' /home/chmarus/Pulpit/mmo/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:18:in `draw' (eval):1:in `upgrade_routes' /home/chmarus/Pulpit/mmo/vendor/plugins/rails_upgrade/lib/tasks/../../lib/routes_upgrader.rb:28:in `generate_new_routes' /home/chmarus/Pulpit/mmo/vendor/plugins/rails_upgrade/lib/tasks/rails_upgrade_tasks.rake:29 /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/task.rb:205:in `call' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/task.rb:200:in `each' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain' /home/chmarus/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/monitor.rb:242:in `synchronize' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/application.rb:90:in `each' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/application.rb:62:in `run' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/lib/rake/application.rb:59:in `run' /home/chmarus/.rvm/gems/ruby-1.8.7-head/gems/rake-0.9.2/bin/rake:32 /home/chmarus/.rvm/gems/ruby-1.8.7-head/bin/rake:19:in `load' /home/chmarus/.rvm/gems/ruby-1.8.7-head/bin/rake:19 Tasks: TOP => rails:upgrade:routes
Wersja ruby: ruby 1.8.7 (2012-04-14 patchlevel 361) [x86_64-linux]
Gem lista:

abstract (1.0.0) actionmailer (3.0.3) actionpack (3.0.3) activemodel (3.2.3, 3.0.3) activerecord (3.0.3) activeresource (3.0.3) activesupport (3.2.3, 3.0.3) acts_as_rated (0.4.1) arel (2.0.10) authlogic (2.1.6) builder (3.0.0, 2.1.2) bundler (1.1.3 ruby) cancan (1.6.7) cocaine (0.2.1) erubis (2.6.6) i18n (0.6.0) mail (2.2.19) mime-types (1.18) multi_json (1.3.4) mysql2 (0.2.7) paperclip (2.7.0) polyglot (0.3.3) rack (1.2.5) rack-mount (0.6.14) rack-test (0.5.7) rails (3.0.3) railties (3.0.3) rake (0.9.2) riddle (1.5.1) rmagick (2.13.1) thinking-sphinx (2.0.11) thor (0.14.6) treetop (1.4.10) tzinfo (0.3.33) watu_table_builder (0.3.0) will_paginate (3.0.3)
Poczatkowo chciałem zrobić upgrade do railsół 3.1, ale był ten sam błąd więc dla pewności upgraduje do 3.0.3 (zalecana wersja dla rails_upgrade)

widać w opisie błędu że wykłada się na routach, wklej plik z routami i się zobaczy

Faktycznie, winny był plik routes.rb, a dokładniej wpis obsługujący routing kalendarza (szczerze, to o nim zapomniałem)
Po wywaleniu poniższej linijki wszystko gra:

 map.calendar '/calendar/:year/:month', :controller => 'calendar', :action => 'index', :year => Time.zone.now.year, :month => Time.zone.now.month

Dzięki!