2

アプリをRails3(Ruby 1.8.7)にアップグレードするのに苦労していますが、現在の障害は「raketest--trace」を実行しているときです。次のようになります。

** Invoke test (first_time)
** Execute test
** Invoke test:units (first_time)
** Invoke test:prepare (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
** Invoke test:functionals (first_time)
** Invoke test:prepare
** Execute test:functionals
DEPRECATION WARNING: "Rails.root/test/mocks/test" won't be added automatically to load paths anymore in future releases. (called from <APP PATH>/config/application.rb:17)
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-3.0.11/lib/action_controller/caching/pages.rb:47: undefined method `config_accessor' for SiteSweeper:Class (NoMethodError)
        from C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/concern.rb:52:in `class_eval'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/concern.rb:52:in `append_features'
        from <APP PATH>/app/sweepers/site_sweeper.rb:4:in `include'
        from <APP PATH>/app/sweepers/site_sweeper.rb:4
        from C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:239:in `require'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:239:in `require'
...

ここでのエラーは、実際にはRails 3.0.11 gem(action_controller / cacheing / pages.rb:47)内にあるコードを示しており、なぜそれが問題を引き起こすのか、またはこれを持っている他の人を見つけることができないのか理解できません問題。また、ActionController :: Cachingのドキュメントを探して、「config_accessor」がなくなったかどうかを確認します。

どんな援助も大歓迎です。

4

1 に答える 1

1

これが完全な答えかどうかはわかりませんが、アップグレードしているアプリケーションの場合、「test/mocks」ディレクトリには何もありませんでした。ディレクトリを削除すると、非推奨メッセージが削除されました。

于 2012-04-27T18:37:29.180 に答える