0

Not quite sure what's changed in my setup, running tests inside Sublime Text 2 was working until recently ... Now, when I run an Rspec test from within Sublime Text 2 I get the following error.

This looks to me like an RVM issue, since I created a gemset a while ago. Any ideas?

Here's the error:

/Users/brettsanders/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:31:in `block in setup': You have already activated spork 0.9.2, but your Gemfile requires spork 0.9.0. Using bundle exec may solve this. (Gem::LoadError)
    from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:17:in `setup'
    from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.3/lib/bundler.rb:107:in `setup'
    from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.3/lib/bundler/setup.rb:17:in `<top (required)>'
    from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from /Users/brettsanders/rails_projects/sample_app/config/boot.rb:6:in `<top (required)>'
    from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/brettsanders/rails_projects/sample_app/config/application.rb:1:in `<top (required)>'
    from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/brettsanders/rails_projects/sample_app/config/environment.rb:2:in `<top (required)>'
    from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/brettsanders/rails_projects/sample_app/spec/spec_helper.rb:8:in `block in <top (required)>'
    from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0@rails3tutorial2ndEd/gems/spork-0.9.2/lib/spork.rb:24:in `prefork'
    from /Users/brettsanders/rails_projects/sample_app/spec/spec_helper.rb:6:in `<top (required)>'
    from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/brettsanders/rails_projects/sample_app/spec/requests/static_pages_spec.rb:1:in `<top (required)>'
    from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0@rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `load'
    from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0@rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `block in load_spec_files'
    from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0@rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `map'
    from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0@rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `load_spec_files'
    from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0@rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:22:in `run'
    from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0@rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:69:in `run'
    from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0@rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:10:in `block in autorun'
[Finished in 0.8s with exit code 1]

Also, Here's my Gemfile

source 'https://rubygems.org'

gem 'rails', '3.2.8'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.10.0'
  gem 'guard-rspec', '0.5.5'
end


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.4'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier',     '1.2.3'
end

gem 'jquery-rails', '2.0.2'

group :test do
  gem 'capybara', '1.1.2'
  gem 'rb-fsevent', '0.4.3.1', :require => false
  gem 'growl', '1.0.3'
  gem 'guard-spork', '0.3.2'
  gem 'spork', '0.9.0'
end

group :production do
  gem 'pg', '0.12.2'
end

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'
4

1 回答 1

0

看起来你已经安装了 0.9.2 版本并且 sublime text 正在尝试使用它

将 GemFile 中的 spork 版本更新为 0.9.2 或执行

gem卸载spork

您将看到要删除哪个版本的选项,请选择带有 0.9.2 的版本

于 2013-04-23T18:19:23.097 回答