sporkrb / spork

A DRb server for testing frameworks (RSpec / Cucumber currently) that forks before each run to ensure a clean testing state.
spork.rubyforge.org
MIT License
1.4k stars 202 forks source link

Could not start Spork server for RSpec after 60 seconds... #224

Open vinodadhikary opened 11 years ago

vinodadhikary commented 11 years ago

Hi,

I'm trying to get RSpec, Spork and Guard to play nicely on Windows7 x64. My ruby version is 1.9.3p392 (2013-02-22) [i386-mingw32]

My problematic output is as follows:

20:51:46 - INFO - Guard uses Notifu to send notifications.
20:51:46 - INFO - Guard uses TerminalTitle to send notifications.

20:51:46 - INFO - Starting Spork for RSpec
Using RSpec, Rails
  -- Rinda Ring Server listening for connections...

  -- Starting to fill pool...
     Wait until at least one slave is provided before running tests...
  ** CTRL+BREAK to stop Spork and kill all ruby slave processes **
Spork is ready and listening on 8989!
   -- build slave 1...
   -- build slave 2...
Preloading Rails environment
Preloading Rails environment
Loading Spork.prefork block...
Loading Spork.prefork block...
Rack::File headers parameter replaces cache_control after Rack 1.5.
Rack::File headers parameter replaces cache_control after Rack 1.5.

20:57:47 - ERROR - Could not start Spork server for RSpec after 60 seconds. I will continue waiting for a further 120 seconds.
]2;[Spork] RSpec NOT started. Continuing to wait for 120 seconds.

The same configuration works really nicely in my linux box. Following is my Gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.12'
gem 'sqlite3'
gem 'jquery-rails'

# Development/Test groups gems
group :development, :test do
  # Required for SQL Server Database interactions
  gem 'activerecord'
  gem 'tiny_tds'
  gem 'activerecord-sqlserver-adapter'

  # Required for Unit/Integration testing
  gem 'rspec-rails'
  gem 'guard-rspec', '>= 1.2.1'
  gem 'guard-spork', '>= 1.2.0'
  gem 'spork', '>= 0.9.2'
  gem 'childprocess', '>= 0.3.6'
end

# Development group specific gems
group :development do 

  gem 'annotate', '>= 2.5.0' 
end

# Test group spedific gems
group :test do 
  gem 'capybara', '>= 1.1.2'
  gem 'rb-inotify', '~> 0.9', :platforms => :ruby
  gem 'libnotify', '>= 0.5.9', :platforms => :ruby
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  gem 'therubyracer'
  gem 'execjs'

  gem 'uglifier', '>= 1.0.3'
end

# Production specific gems
group :production do 

end

Is this a known problem? If not then any clues are appreciated! Let me know if you need any further information regarding this issue.

Thanks

nevir commented 11 years ago

I ran into this because I was accidentially causing Spork's each_run block to trigger during initialization (that block causes spork to kill the current process at the end since it's forking)

ghost commented 10 years ago

Remove your test directory in your app or rename it to test_old.

vinodadhikary commented 10 years ago

Sorry @Sadik, I do not have test directory.