rake 失败并显示“虚拟计时器已过期”
以下是我的环境:
- OS X 10.5
- Xcode 3.1.4
- rvm 0.1.38
- ruby 1.8.9-p399(通过 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$
The following is my environment:
- OS X 10.5
- Xcode 3.1.4
- rvm 0.1.38
- ruby 1.8.9-p399 (via rvm)
- rails 2.3.8
I started getting this error when rake tries to run my tests:
bash$ rake
Virtual timer expired
bash$ # End of output!
And with tracing enabled:
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$
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来 ruby 有问题, rev23993 导致分叉时虚拟计时器过期,这又会触发 mysql gem 内部的错误。
实际的解决方法似乎是将 mysql gem 从 2.8.1 降级
到版本 2.7:
It looks like there is an problem in ruby, rev23993 causes Virtual Timer Expired when forking, which in turn triggers the error inside the mysql gem.
The practical workaround seems to be to downgrade the mysql gem from 2.8.1
to version 2.7: