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:
-
Instalacja rails_upgrade [ok]
-
rake rails:upgrade:backup [ok]
-
rake rails:upgrade:check [ok]
-
Instalacja rails 3.0.3 w tym samym katalogu
-
rake rails:upgrade:configuration [ok] (przekleiłem zawartnośc environment.rb do application.rb bez wpisów o gemach)
-
rake rails:upgrade:gems [ok]
-
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)