我最近将Ruby项目中的Rspec Gem从2.12.0升级到2.99.2。在我升级之前一切正常,但是一旦我升级到2.99.2并运行我的一个规范测试,就会弹出“rake aborted - 无法加载此类文件错误”。错误消息说它无法加载support / ext / vcr,这是我在spec文件中需要的另一个rb文件,有什么想法吗?
rake aborted!
cannot load such file -- support/ext/vcr
(See full trace by running task with --trace)
# ./spec/integration/resque_integration_spec.rb:31:in `rescue in wait_for'
# ./spec/integration/resque_integration_spec.rb:22:in `wait_for'
# ./spec/integration/resque_integration_spec.rb:77:in `block (2 levels) in <top (required)>'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:116:in `block in run'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:248:in `with_around_each_hooks'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:113:in `run'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:515:in `block in run_examples'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `map'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `run_examples'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:496:in `run'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block (2 levels) in run'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `map'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block in run'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/reporter.rb:58:in `report'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:21:in `run'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:in `run'
# /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in `block in autorun'
答案 0 :(得分:0)
更新后,应始终重新启动开发环境。看看这样做是否有帮助。