我刚刚安装了 Zentest 4.4.6,其中包括 autotest 4.4.6,当我运行 autotest 时出现以下错误:
gems/ZenTest-4.6.0/lib/autotest.rb:226:in `autodiscover': undefined method `any?' for Gem::Specification:Class (NoMethodError)
嗯?就像它恢复到没有导轨的红宝石
我刚刚安装了 Zentest 4.4.6,其中包括 autotest 4.4.6,当我运行 autotest 时出现以下错误:
gems/ZenTest-4.6.0/lib/autotest.rb:226:in `autodiscover': undefined method `any?' for Gem::Specification:Class (NoMethodError)
嗯?就像它恢复到没有导轨的红宝石
我不懂日语,但是看着
http://d.hatena.ne.jp/hkj/20110724
我了解到您可以通过将第 226 行更改为:
# hacky_discovery = Gem::Specification.any? { |s| s.name =~ /^rspec/ }
至
# hacky_discovery = true
此行最后在此提交中修改:https ://github.com/seattlerb/zentest/commit/b462a8f1dcc03528d91c77cabc15f8575d9c378c
此处报告此问题:https ://github.com/seattlerb/zentest/issues/5
更新:要解决这个问题,只需升级您的 rubygems:gem update --system
更新 2:ZenTest 4.6.1 解决了这个问题。
我遇到了这个问题,发现可以通过从 rubygems 1.8.6 迁移到 1.8.5 来避免它
我只是在 Gemfile 中使用版本,直到问题消失。测试组件之间存在一些奇怪的不兼容性。