以下是我的环境:
当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$
答案 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'