升级到Rails 2.3.10堆栈太深

时间:2011-01-20 21:03:34

标签: ruby-on-rails upgrade

我一直在尝试从2.3.5升级到Rails 2.3.10。我一升级,就不能再进行任何测试了。当我尝试运行rake test:例如,我看到它已准备就绪,然后一旦'Started'出现就会挂起。经过很长一段时间,它最终失败了,只是说'堆栈水平太深'。这和错误一样有用。当我启动一个杂种来测试网站时,该网站运行正常。我已经尝试使用所有相同的宝石和插件制作一个新的2.3.10应用程序,并且测试在该项目中运行良好。

所以,我现在完全被困住了。其他人有这个麻烦吗?

编辑---

这是整个堆栈跟踪。警告!太长了!

Calebs-iMac:missionmakr keeker1$ rake test:recent --trace
(in /Users/keeker1/Documents/missionmakr)
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks, vendor/plugins   /delayed_job/tasks, vendor/plugins/fetcher/tasks, vendor/plugins/foreigner/tasks, vendor/plugins  /paperclip/tasks, vendor/plugins/qunit_for_rails/tasks, vendor/plugins/rails-fuzzy-search/tasks,   vendor/plugins/sms-fu/tasks, vendor/plugins/xss_terminate/tasks, and vendor/plugins/yaml_db/tasks    are deprecated. Use lib/tasks instead. (called from /Users/keeker1/Documents/missionmakr/vendor/rails/railties/lib/tasks/rails.rb:10)
** Invoke test:recent (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
** Execute db:test:prepare
** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment 
** Execute db:test:purge
** Execute db:test:load
** Invoke db:schema:load (first_time)
** Invoke environment 
** Execute db:schema:load
** Execute test:recent
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/bin/ruby -I"lib:test" "/Users/keeker1/.rvm/gems/ruby- 1.8.7-p302/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/admin/announcement_test.rb" 
DEPRECATION WARNING: require "actionmailer" is deprecated and will be removed in Rails 3. Use   require "action_mailer" instead. (called from /Users/keeker1/Documents/missionmakr/vendor/rails /actionmailer/lib/actionmailer.rb:2)
Loaded suite /Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
EE
Finished in 254.876779 seconds.

1) Error:
test_should_create_new_announcement(AnnouncementTest):
SystemStackError: stack level too deep
/lib/fk_fixture_patch.rb:10:in `disable_referential_integrity'
/lib/fk_fixture_patch.rb:7:in `disable_referential_integrity'

2) Error:
test_should_show_error_when_message_is_blank(AnnouncementTest):
SystemStackError: stack level too deep
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/erb.rb:719:in `inject'
/lib/fk_fixture_patch.rb:10:in `disable_referential_integrity'
/lib/fk_fixture_patch.rb:7:in `disable_referential_integrity'

2 tests, 0 assertions, 0 failures, 2 errors
rake aborted!
Command failed with status (1): [/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302...]
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:995:in `sh'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:1010:in `call'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:1010:in `sh'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:1094:in `sh'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:1029:in `ruby'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:1094:in `ruby'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake/testtask.rb:117:in `define'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:1112:in `verbose'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake/testtask.rb:102:in `define'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:597:in  `invoke_with_call_chain'
/Users/keeker1/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/gems/rake-0.8.7/bin/rake:31
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/bin/rake:19:in `load'
/Users/keeker1/.rvm/gems/ruby-1.8.7-p302/bin/rake:19
Calebs-iMac:missionmakr keeker1$

我也尝试删除我的补丁lib / fk_fixture_patch.rb但它仍然无效。

以下是test_should_show_error_when_message_is_blank方法的代码。

def test_should_show_error_when_message_is_blank
   a = Announcement.create(:message => "", :starts_at => 3.days.from_now, :ends_at => 10.days.from_now)
   assert !a.valid?
end

fk_fixture_patch.rb文件适用于我们的服务器,因此我们可以为测试数据加载灯具。我们在数据库中使用外键约束。我试着评论出这段代码,但测试仍然无法运行。

1 个答案:

答案 0 :(得分:1)

好的,我终于弄明白发生了什么! :)

我使用acts_as_tree插件在我的一个模型中遇到了无限循环问题。这是我的评论模型中的错误代码行:

named_scope :parents, :conditions => {:parent_id => 0}

我想因为我的表中有一个名为parent_id的列,所以ActiveRecord搞砸了我有一个名为scope的命名范围:parents。我将我的范围重命名为:parents_only,一切都恢复正常。奇怪的是,旧代码在Rails 2.3.5中运行良好....哦,好吧

感谢大家的帮助!

迦勒