美文网首页Ruby on RailsRubyRuby、Rails知识
Ruby 报错 aggregated_results: wron

Ruby 报错 aggregated_results: wron

作者: 云抱住阳光太阳没放弃发亮 | 来源:发表于2017-07-08 15:45 被阅读48次

    在rails中,使用rake命令或者test命令中抛出了一个错误:

    Finished in 0.316243s, 50.5940 runs/s, 88.5395 assertions/s.
    .../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/railties-5.0.2/lib/rails/test_unit/minitest_plugin.rb:9:in `aggregated_results': wrong number of arguments (given 1, expected 0) (ArgumentError)
        from .../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/minitest-5.10.2/lib/minitest.rb:597:in `report'
        from .../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/minitest-5.10.2/lib/minitest.rb:687:in `each'
        from .../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/minitest-5.10.2/lib/minitest.rb:687:in `report'
        from .../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/minitest-5.10.2/lib/minitest.rb:141:in `run'
        from .../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/railties-5.0.2/lib/rails/test_unit/minitest_plugin.rb:72:in `run'
        from .../.rvm/gems/ruby-2.4.1@ruby2.4.1-rails5.0/gems/minitest-5.10.2/lib/minitest.rb:63:in `block in autorun'
    

    这是一个bug,rails在这次更新中修复了它rails/rails#29022,但是因为种种原因,不想更新版本怎么办?

    Gemfile中加入这样一行:

    gem "minitest", "5.10.1"
    

    在对应的环境(test或者development)下,再执行bundle install即可解决。

    相关文章

      网友评论

        本文标题:Ruby 报错 aggregated_results: wron

        本文链接:https://www.haomeiwen.com/subject/xffjhxtx.html