0

我正在尝试设置我的 ST2 以便能够从编辑器运行我的测试。当我点击“Command”+“Shift”+“T”时,我不断收到某种运行时错误。这是堆栈跟踪。任何帮助,将不胜感激。

No DRb server is running. Running in local process instead ...
/Users/susiehamm/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.0.pre.2/lib/bundler/runtime.rb:31:in `block in setup': You have already activated rspec-core 2.13.0, but your Gemfile requires rspec-core 2.11.1. Using bundle exec may solve this. (Gem::LoadError)
    from /Users/susiehamm/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.0.pre.2/lib/bundler/runtime.rb:17:in `setup'
    from /Users/susiehamm/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.0.pre.2/lib/bundler.rb:117:in `setup'
    from /Users/susiehamm/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.0.pre.2/lib/bundler/setup.rb:17:in `<top (required)>'
    from /Users/susiehamm/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require'
    from /Users/susiehamm/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
    from /Users/susiehamm/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
    from /Users/susiehamm/Documents/Rails/sample_app/config/boot.rb:6:in `<top (required)>'
    from /Users/susiehamm/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /Users/susiehamm/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /Users/susiehamm/Documents/Rails/sample_app/config/application.rb:1:in `<top (required)>'
    from /Users/susiehamm/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /Users/susiehamm/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /Users/susiehamm/Documents/Rails/sample_app/config/environment.rb:2:in `<top (required)>'
    from /Users/susiehamm/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /Users/susiehamm/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /Users/susiehamm/Documents/Rails/sample_app/spec/spec_helper.rb:10:in `block in <top (required)>'
    from /Users/susiehamm/.rvm/gems/ruby-2.0.0-p0/gems/spork-0.9.2/lib/spork.rb:24:in `prefork'
    from /Users/susiehamm/Documents/Rails/sample_app/spec/spec_helper.rb:4:in `<top (required)>'
    from /Users/susiehamm/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /Users/susiehamm/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /Users/susiehamm/Documents/Rails/sample_app/spec/requests/static_pages_spec.rb:1:in `<top (required)>'
    from /Users/susiehamm/.rvm/gems/ruby-2.0.0-p0/gems/rspec-core-2.13.0/lib/rspec/core/configuration.rb:819:in `load'
    from /Users/susiehamm/.rvm/gems/ruby-2.0.0-p0/gems/rspec-core-2.13.0/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
    from /Users/susiehamm/.rvm/gems/ruby-2.0.0-p0/gems/rspec-core-2.13.0/lib/rspec/core/configuration.rb:819:in `each'
    from /Users/susiehamm/.rvm/gems/ruby-2.0.0-p0/gems/rspec-core-2.13.0/lib/rspec/core/configuration.rb:819:in `load_spec_files'
    from /Users/susiehamm/.rvm/gems/ruby-2.0.0-p0/gems/rspec-core-2.13.0/lib/rspec/core/command_line.rb:22:in `run'
    from /Users/susiehamm/.rvm/gems/ruby-2.0.0-p0/gems/rspec-core-2.13.0/lib/rspec/core/runner.rb:77:in `rescue in run'
    from /Users/susiehamm/.rvm/gems/ruby-2.0.0-p0/gems/rspec-core-2.13.0/lib/rspec/core/runner.rb:73:in `run'
    from /Users/susiehamm/.rvm/gems/ruby-2.0.0-p0/gems/rspec-core-2.13.0/lib/rspec/core/runner.rb:17:in `block in autorun'
[Finished in 0.8s with exit code 1]
4

1 回答 1

0

该错误似乎很容易解释:

您已经激活了 rspec-core 2.13.0,但您的 Gemfile 需要 rspec-core 2.11.1。使用 bundle exec 可以解决这个问题。(宝石::加载错误)

调整 rspec-rails 的版本(包含 rspec-core)或使用 bundle exec 运行。

解决方案:

在您的 gemfile 中,更改:

gem 'rspec-rails', '2.11.0' 

到:

gem 'rspec rails', '2.13.0'
于 2013-02-26T12:18:33.663 回答