Closed danil-z closed 12 years ago
Thanks for putting this in for me!
Ok it should be fixed now, please can you try master branch before I make a release.
gem 'guard-spork', :git => 'git://github.com/guard/guard-spork.git'
Gave it a try just now and I'm getting the following error and it just seems to be sitting at Booting Rails for test environment.
PS C:\Users\Chris\Documents\Aptana Studio 3 Workspace\StoryMode> bundle exec guard start
Guard is now watching at 'C:/Users/Chris/Documents/Aptana Studio 3 Workspace/StoryMode'
Starting Spork for RSpec
ERROR: Guard::Spork failed to achieve its f ork' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bundler/gems/guard-spork-e2839bb2cc51/lib/guard/spork/runner.rb:39:in
s
pawn_child'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bundler/gems/guard-spork-e2839bb2cc51/lib/guard/spork/runner.rb:23:in l aunch_sporks' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bundler/gems/guard-spork-e2839bb2cc51/lib/guard/spork.rb:17:in
start'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-0.8.4/lib/guard.rb:276:in block in run_supervised_task' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-0.8.4/lib/guard.rb:274:in
catch'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-0.8.4/lib/guard.rb:274:in run_supervised_task' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-0.8.4/lib/guard.rb:207:in
block (3 levels) in run_guard_task
'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-0.8.4/lib/guard.rb:203:in each' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-0.8.4/lib/guard.rb:203:in
block (2 levels) in run_guard_task
'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-0.8.4/lib/guard.rb:202:in catch' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-0.8.4/lib/guard.rb:202:in
block in run_guard_task'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-0.8.4/lib/guard.rb:201:in each' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-0.8.4/lib/guard.rb:201:in
run_guard_task'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-0.8.4/lib/guard.rb:119:in start' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-0.8.4/lib/guard/cli.rb:61:in
start'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in run' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in
invoke_task'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor.rb:263:in dispatch' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:389:in
start'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-0.8.4/bin/guard:6:in <top (required)>' C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bin/guard:19:in
load'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bin/guard:19:in `
Guard::Spork has just been fired Bundle already up-to-date Compiling rails assets with Guard::RailsAssets::RailsRunner. Booting Rails for test environment.
Ok, so it seems that fork
isn't supported on Windows either :(.
Please can you try with guard-spork version 0.1.0 & 0.1.5 to see if it works.
PS C:\Users\Chris\Documents\Aptana Studio 3 Workspace\StoryMode> bundle exec guard start Guard is now watching at 'C:/Users/Chris/Documents/Aptana Studio 3 Workspace/StoryMode' 'kill' is not recognized as an internal or external command, operable program or batch file. Starting Spork for RSpec The process cannot access the file because it is being used by another process. ERROR: Could not start Spork for RSpec. Make sure you can use it manually first.
Guard is now watching at 'C:/Users/Chris/Documents/Aptana Studio 3 Workspace/StoryMode' 'ps' is not recognized as an internal or external command, operable program or batch file. Starting Spork for RSpec Using RSpec -- 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! Spork for RSpec successfully started -- Rinda Ring Server listening for connections...
-- build slave 1... Preloading Rails environment -- build slave 2... Preloading Rails environment Bundle already up-to-date Compiling rails assets with Guard::RailsAssets::RailsRunner. Booting Rails for test environment. Loading Spork.prefork block... Loading Spork.prefork block... Assets compiled. Guard::RSpec is running, with RSpec 2! Running all specs --> DRb magazine_slave_service: 1 provided... --> DRb magazine_slave_service: 2 provided... Running tests with args ["--color", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "- -out", "/dev/null", "--require", "C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/guard-rspec-0.4.5/lib/guard/rspec /formatters/notification_rspec.rb", "spec"]... <-- take tuple(2); slave.run... *.....................................FFFF
Looks like 0.1.5 ran fine except it looked like it used spork but may have also started up it's on version of rails test? Thanks for your help on this!
Can you try to add the win32-process
gem in your Gemfile (with the master version of guard-spork
):
gem 'win32-process', :require => 'win32/process'
It should add fork
and kill
support to Windows
Looks like fork() is not working in win32-process at least on my machine (Win7). I'm getting this error again:
Starting Spork for RSpec
ERROR: Guard::Spork failed to achieve its
Ok, you should open an issue about this onwin32-process
gem. I think I cannot do more for this on the guard-spork
side, sorry.
Ok, thanks for your help on this, I really appreciate it.
Thanks, you're welcome.
I submitted one: https://github.com/djberg96/win32-process/issues/5
Great, thanks!
The win32-process owner answered thusly:
"I don't know what guard-spork is, but Process.fork on Windows was an experimental implementation that I wouldn't use in production. And SIGCHLD is an unsupported signal on Windows anyway afaik. The guard-spork library should either try to use threads on Windows or declare that it isn't supported on Windows."
The need of SIGCHLD
has already been removed but the current guard-spork implementation need Process.fork
so I don't think Windows support will be possible right now, sorry. :(
That's ok, thanks for your help! It seems like maybe Cygwin is the way to go for RoR developers on Windows.
Thanx!!!!!
guard-spork, version - 0.1.5 is working fine with windows
The error I'm seeing is as follows, when I run 'bundle exec guard':
ERROR: Invalid Guardfile, original error is: unsupported signal SIGCHLD
As soon as I take the spork guard out it runs fine again. I am new to ruby/rails but anything you need from me let me know. I am running guard 0.8.2, spork 0.9.0.rc and guard-spork 0.3.0. Also, I am on Window 7 and run rails 3.1 and ruby 1.9.2.