Ruby 无法再运行rspec了

Ruby 无法再运行rspec了,ruby,linux,rspec,Ruby,Linux,Rspec,我有Ruby2.0和RSpec3.0。我卸载了所有RSpec3.0 gems,并将它们替换为2.0。我这样做是为了摆脱弃用警告。现在,我的规格不起作用。我得到下面的错误。错误告诉了我什么,我如何修复它?关于这一点的堆栈溢出帖子都没有帮助 /zombie/spec/spec_helper.rb:29:in `block (2 levels) in <top (required)>': undefined method `include_chain_clauses_in_custom_m

我有Ruby2.0和RSpec3.0。我卸载了所有RSpec3.0 gems,并将它们替换为2.0。我这样做是为了摆脱弃用警告。现在,我的规格不起作用。我得到下面的错误。错误告诉了我什么,我如何修复它?关于这一点的堆栈溢出帖子都没有帮助

/zombie/spec/spec_helper.rb:29:in `block (2 levels) in <top (required)>': undefined method `include_chain_clauses_in_custom_matcher_descriptions=' for #<RSpec::Matchers::Configuration:0x00000001a73928> (NoMethodError)
    from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:398:in `expect_with'
    from /home/lsusr/Code/Rspec/zombie/spec/spec_helper.rb:21:in `block in <top (required)>'
    from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core.rb:92:in `configure'
    from /home/lsusr/Code/Rspec/zombie/spec/spec_helper.rb:17:in `<top (required)>'
    from /home/lsusr/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/lsusr/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:434:in `block in requires='
    from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:434:in `map'
    from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:434:in `requires='
    from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:20:in `block in configure'
    from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:19:in `each'
    from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:19:in `configure'
    from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:21:in `run'
    from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:in `run'
    from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun'
然后,我使用
gem install rspec
重新安装了rspec,它为我提供了rspec 3.0并修复了所有问题。但是,我又收到了弃用警告

请告诉我发生错误的原因。教程作者说它应该与RSpec2.10.0或更高版本一起使用

教程作者说它应该与RSpec2.10.0或更高版本一起使用

作者的意思可能是2.10或更高,在2.x范围内。rspec3.x有突破性的变化

尝试像以前一样卸载gems,然后执行以下操作:

gem install rspec '>=2.10', '<3'

gem安装rspec'>=2.10',谢谢。但是,我如何找出错误发生的原因呢?我只是猜测更改gem版本会有所帮助,但我没有确凿的理由。我在答案中为您添加了更多信息,以解释错误发生的原因。
gem install rspec '>=2.10', '<3'