Rspec 已经运行了一段时间,但是在运行任何 rspec 测试时我突然遇到了这个问题:
/Users/joseph/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:437:in `require': no such file to load -- rspec/instafail (LoadError)
from /Users/joseph/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:437:in `block in requires='
from /Users/joseph/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:435:in `map'
from /Users/joseph/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:435:in `requires='
from /Users/joseph/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:20:in `block in configure'
from /Users/joseph/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:19:in `each'
from /Users/joseph/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:19:in `configure'
from /Users/joseph/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:21:in `run'
from /Users/joseph/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:66:in `rescue in run'
from /Users/joseph/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:62:in `run'
from /Users/joseph/.rvm/gems/ruby-1.9.2-p180/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun'
我通常对我的项目进行几次检查(即 git clone 两次到不同的目录中)。出于某种原因,即使使用相同版本的代码,rspec 只会在我的一个结帐中遇到此问题,而在另一个结帐中则不会。我最终通过创建另一个克隆来规避这个问题。由于某种原因,这个问题再次出现,我不想继续创建克隆来避免这个问题。有谁知道可能是什么根本原因?