guard/guard-process

Fails to execute with ruby 1.9.3 in windows 7

Closed this issue · 10 comments

Hello,

I get the following message when attempting to use guard-process in windows 7 using ruby-1.9.3p286:

13:03:42 - ERROR - �[0;31mCould not load 'guard/process' or find class Guard::Process�[0m
13:03:42 - ERROR - �[0;31mFunction 'posix_spawn' not found in [msvcrt.dll]�[0m
13:03:42 - ERROR - �[0;31mInvalid Guardfile, original error is:
 > [#] undefined method `new' for nil:NilClass�[0m

I have never tried guard-process on Windows how did you install Ruby in Windows?

using Ruby Installer from http://rubyinstaller.org/. It works fine with rails, sass, and compass but for some reason guard-process just won't run.

guard-process uses Spoon to spawn processes, and that uses functions not present in Windows and also not provided by the Ruby installer. We will probably have to find another way to do this in Windows.

For ruby 1.9 you can look at Process.spawn (http://www.ruby-doc.org/core-1.9.3/Process.html#method-c-spawn) which seems to have windows support

Spoon master has Windows support added in (see headius/spoon#8 and headius/spoon#9), when the next version of Spoon gets released it should make guard-process work properly with Windows. I'm hoping that version will be released soon :)

Awesome, thanks

Do you know any alternative for now? I really would love to use a similar functionality on windows.

You could try installing the master version of spoon (the repo is here: https://github.com/headius/spoon) and see if that works... or you could try @ahmeij's idea and see if you can make guard-process work on Windows with Process#spawn

I (only now) see that a new version of Spoon was released in March. Does it now work properly in Windows?

I'm closing this issue there hasn't been any activity on it since last August. If anyone has similar problems with recent version please re-open this issue or open a new one.