rake因“虚拟计时器已过期”而失败

时间:2010-06-21 15:24:04

标签: ruby-on-rails rake

以下是我的环境:

  • OS X 10.5
  • Xcode 3.1.4
  • rvm 0.1.38
  • ruby​​ 1.8.9-p399(via rvm)
  • rails 2.3.8

当rake尝试运行我的测试时,我开始收到此错误:

bash$ rake
Virtual timer expired
bash$  # End of output!

启用跟踪:

bash$ rake --trace
** Invoke default (first_time)
** Invoke test (first_time)
** Execute test
** Invoke test:units (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
Virtual timer expired
bash$

1 个答案:

答案 0 :(得分:15)

看起来ruby中存在问题,rev23993 causes Virtual Timer Expired when forking,这反过来会触发 mysql gem中的错误。

实际的解决方法似乎是将mysql gem从2.8.1 降级 到版本2.7:

#environment.rb
config.gem 'mysql', :version => '2.7'