升级到 Rails 2.3.10 堆栈太深

发布于 2024-10-13 02:33:18 字数 16652 浏览 0 评论 0原文

我在尝试从 Rails 2.3.5 升级到 Rails 2.3.10 时经历了最奇怪的一段时间。一旦升级,我就无法再运行任何测试。例如,当我尝试运行 rake test:units 时,我看到它已准备好一切,然后一旦出现“Started”就挂在那里。经过很长一段时间后,它最终失败并只是说“堆栈级别太深”。这与错误一样有帮助。当我启动一个杂种来测试该网站时,该网站运行良好。我尝试使用所有相同的 gem 和插件制作一个新的 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 文件是我们服务器的文件,因此我们可以加载测试数据的装置。我们在数据库中使用外键约束。我尝试注释掉这段代码,但测试仍然无法运行。

I've been having the weirdest time trying to upgrade to Rails 2.3.10 from 2.3.5. As soon as I upgraded, I can no longer run any tests. When I try running rake test:units for example, I see it get everything ready and then as soon as 'Started' appears is just hangs there. After a long time it eventually fails and just says 'stack level too deep'. That's about as helpful as the error is. The site runs fine when I boot up a mongrel to test out the site. I've tried making a new 2.3.10 app with all of the same gems and plugins and the tests ran fine in that project.

So, I'm totally stuck right now. Anyone else have this trouble?

Edit ---

Here's the whole stack trace. Warning! It's long!

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$

I've also tried removing my patch lib/fk_fixture_patch.rb and it still didn't work.

Here's the code for the test_should_show_error_when_message_is_blank method.

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

The fk_fixture_patch.rb file is something for our server so we can load fixtures for test data. We use foreign key constraints in our database. I tried commenting out this code but the tests still wouldn't run.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橙幽之幻 2024-10-20 02:33:18

好吧,我终于明白是怎么回事了! :)

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

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

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

谢谢大家的帮助!

迦勒

Ok, I finally figured out what was going on! :)

I had an infinite loop problem in one of my models using the acts_as_tree plugin. Here's the bad line of code in my Comments model:

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

I guess since I had a column in my table called parent_id, ActiveRecord was getting messed up that I had a named scope called :parents. I renamed my scope to :parents_only and everything was back to normal. It's weird that the old code worked fine in Rails 2.3.5.... oh well

Thanks everyone for your help!

Caleb

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文