Всякий раз, когда я запускаю spork
, я получаю
$ spork
Using RSpec
Preloading Rails environment
Loading Spork.prefork block...
no such file to load -- spork (LoadError)
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `block in require'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in `new_constants_in'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
/Users/darth/projects/checkin/spec/spec_helper.rb:2:in `<top (required)>'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `block in load'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in `new_constants_in'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/spork-0.9.0.rc9/lib/spork/test_framework.rb:138:in `block (2 levels) in preload'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/spork-0.9.0.rc9/lib/spork/app_framework/rails.rb:8:in `preload'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/spork-0.9.0.rc9/lib/spork/test_framework.rb:134:in `block in preload'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/spork-0.9.0.rc9/lib/spork.rb:62:in `exec_prefork'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/spork-0.9.0.rc9/lib/spork/test_framework.rb:120:in `preload'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/spork-0.9.0.rc9/lib/spork/run_strategy/forking.rb:25:in `preload'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/spork-0.9.0.rc9/lib/spork/runner.rb:74:in `run'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/spork-0.9.0.rc9/lib/spork/runner.rb:10:in `run'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/spork-0.9.0.rc9/bin/spork:10:in `<top (required)>'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/bin/spork:19:in `load'
/Users/darth/.rvm/gems/ruby-1.9.2-p290/bin/spork:19:in `<main>'
Я помню, что пару дней назад уже работал spork, но я возился с моим Gemfile, чтобы он работал на Heroku, и я могу 'Кажется, сейчас это работает.Вот мой Gemfile
source 'http://rubygems.org'
gem 'rack', '1.3.3'
gem 'rails', '3.1.0'
gem 'json'
gem 'jquery-rails'
gem 'pg', :group => :production
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
gem 'nifty-generators', :group => :development
group :development, :test do
gem 'sqlite3'
gem 'rspec-rails'
group :darwin do
gem 'rb-fsevent', :require => false
gem 'rb-inotify', :require => false
gem 'rb-fchange', :require => false
end
gem 'spork', '> 0.9.0.rc'
gem 'guard-rspec', :require => false
gem 'guard-spork', :require => false
gem 'growl'
gem 'cucumber-rails'
gem 'database_cleaner'
gem 'webrat'
gem 'capybara'
gem 'factory_girl_rails'
end
Когда я пытаюсь запустить spork в другом проекте, он, кажется, работает нормально, поэтому проблема должна быть где-то в конфигурации.
bundle exec spork
дает мне
/Users/darth/.rvm/gems/ruby-1.9.2-p290/gems/bundler-
1.0.21/lib/bundler/rubygems_integration.rb:143:in `block in replace_gem':
spork is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
from /Users/darth/.rvm/gems/ruby-1.9.2-p290/bin/spork:18:in `<main>'