自动测试问题

发布于 2024-11-26 12:33:15 字数 250 浏览 5 评论 0 原文

我刚刚安装了 Zentest 4.4.6,其中包括自动测试 4.4.6,当我运行自动测试时,出现以下错误:

gems/ZenTest-4.6.0/lib/autotest.rb:226:in `autodiscover': undefined method `any?' for Gem::Specification:Class (NoMethodError)

嗯?就像它恢复到没有 Rails 的 ruby​​ 一样

I just installed Zentest 4.4.6 which includes autotest 4.4.6 and when I run autotest I get the following error:

gems/ZenTest-4.6.0/lib/autotest.rb:226:in `autodiscover': undefined method `any?' for Gem::Specification:Class (NoMethodError)

huh? it's like it reverted back to ruby without rails

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

顾北清歌寒 2024-12-03 12:33:15

我不懂日语,但看

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

更新:要解决此问题,只需升级您的 ruby​​gems:gem update -- system

更新2:ZenTest 4.6.1解决了这个问题。

I don't know japanese, but looking at

http://d.hatena.ne.jp/hkj/20110724

I learned that you can make it work by changing line 226 from:

# hacky_discovery = Gem::Specification.any? { |s| s.name =~ /^rspec/ }

to

# hacky_discovery = true

This line was last modified in this commit: https://github.com/seattlerb/zentest/commit/b462a8f1dcc03528d91c77cabc15f8575d9c378c

This issue is reported here: https://github.com/seattlerb/zentest/issues/5

UPDATE: To solve this problem just upgrade your rubygems: gem update --system

UPDATE 2: ZenTest 4.6.1 solves this problem.

猫卆 2024-12-03 12:33:15

我遇到了这个问题,发现可以通过从 ruby​​gems 1.8.6 迁移到 1.8.5 来避免它

I had this problem and found it can be avoided by moving from rubygems 1.8.6 to 1.8.5

末骤雨初歇 2024-12-03 12:33:15

我只是尝试了 Gemfile 中的版本,直到问题消失。测试组件之间存在一些奇怪的不兼容性。

I just played around with versions in the Gemfile until the problem went away. There is some weird incompatibility between testing components.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文