guard / guard-spork

Guard::Spork automatically manage Spork DRb servers
https://rubygems.org/gems/guard-spork
MIT License
296 stars 58 forks source link

0.1.3 seemingly not working with Spork 0.9.0.rc2, ruby 1.9.2 and Rails 3.0.3 on OS X 10.6.5 ? #4

Closed fredv closed 13 years ago

fredv commented 13 years ago

Hi,

I am working with spork for some time and followed all steps for the guard and guard-spork installation on OS X 10.6.5, but it guard gives me (even with -d in debug mode) only the following startup message:

$ guard start Guard is now watching at '/path/to/project' Starting Spork for RSpec ERROR: Could not start Spork for RSpec. Make sure you can use it manually first. Bye bye...

Guardfile: guard 'spork', :cucumber => false do watch('^config/application.rb$') watch('^config/environment.rb$') watch('^config/environments/..rb$') watch('^config/initializers/..rb$') watch('^spec/spec_helper.rb') end

Gems used: rails (3.0.3) rspec (2.3.0) rspec-rails (2.3.0) spork (0.9.0.rc2) guard (0.2.2) guard-spork (0.1.3)

Spork runs fine: bundle exec spork Using RSpec Preloading Rails environment Loading Spork.prefork block... Spork is ready and listening on 8989!

Is there an easy way to produce a more meaningful error message since both "bundle exec spork" and simply "spork" run perfectly fine on the particular rails project?

Thanks for any hint on this!

thibaudgg commented 13 years ago

Hi Frederik, How many time take your Rails application to load? By default guard-spork will only wait 20s, you can change this behaviour with the wait option. guard 'spork', :wait => 30 do

fredv commented 13 years ago

Hi Thibaud,

that was it. The rails app takes - due to bundler and about 100 gems - a lot of time to load. Setting :wait to above 60 did the trick.

Thank you very much! Frederik

vidriloco commented 13 years ago

Hi. I have set the wait time up to 200 and still receive the same error:

ERROR: Could not start Spork for RSpec. Make sure you can use it manually first.

Anyone else experiencing this? As fredv, when running "spork" after some seconds I can see:

Spork is ready and listening on 8989!

thibaudgg commented 13 years ago

Hi, are you launching Spork with Bundler bundle exec spork? Guard::Spork launch by default Spork with Bundler, it can be disabled with :bundler => false.