加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – rake因“虚拟计时器已过期”而失败

发布时间:2020-12-16 21:20:18 所属栏目:百科 来源:网络整理
导读:以下是我的环境: OS X 10.5 Xcode 3.1.4 rvm 0.1.38 ruby1.8.9-p399(通过rvm) rails 2.3.8 当rake尝试运行我的测试时,我开始收到此错误: bash$rakeVirtual timer expiredbash$ # End of output! 并启用跟踪: bash$rake --trace** Invoke default (first_t
以下是我的环境:

> OS X 10.5
> Xcode 3.1.4
> rvm 0.1.38
>ruby1.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$

解决方法

看起来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'

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读