【问题标题】:autotest problem自动测试问题
【发布时间】:2011-07-23 19:01:53
【问题描述】:

我刚刚安装了 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)

嗯?这就像它恢复到没有导轨的红宝石

【问题讨论】:

    标签: ruby-on-rails autotest zentest


    【解决方案1】:

    我不会日语,但是看着

    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 解决了这个问题。

    【讨论】:

    • 我刚刚编辑了我的回复。我现在使用 gems 1.8.5 而不是 1.6.2,它工作正常。
    • 遇到了同样的问题;更新 ruby​​gems 修复了它。谢谢!
    【解决方案2】:

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

    【讨论】:

      【解决方案3】:

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

      【讨论】:

        猜你喜欢
        • 2020-11-29
        • 1970-01-01
        • 2014-04-16
        • 2011-12-29
        • 1970-01-01
        • 1970-01-01
        • 2021-08-27
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多