akephalos icon indicating copy to clipboard operation
akephalos copied to clipboard

Small patch to make akephalos work on windows

Open noniq opened this issue 13 years ago • 9 comments

The change in the call to IO.popen in remote_client.rb is taken from https://github.com/bernerdschaefer/akephalos/issues#issue/18/comment/485887 .

Additionally I had to replace ":" with File::PATH_SEPARATOR in two places in bin/akephalos.

With these changes, running a cucumber feature using akephalos works (tested on Windows 7). It leaves the command prompt in kind of a weird state, however. Not sure yet what's causing this – for now I just close and reopen the command prompt window, if necessary.

noniq avatar Feb 14 '11 12:02 noniq

You're great, noniq. I hope this one gets pulled soon.

nusco avatar Mar 27 '11 13:03 nusco

I tried the patch on a Windows XP machine. It runs (which is what I needed, of course). It still seems to have trouble closing the remote process. Apparently, the cause is line 65 in remote_client.rb:

  at_exit { Process.kill(:INT, remote_client.pid) }

Maybe this could be replaced with a check for the OS, and possibly use the kill() method from win32-process (see: https://rubyforge.org/docman/view.php/85/707/README.html).

Already a very worthy patch even without fixing this.

nusco avatar Mar 30 '11 12:03 nusco

Is there anything I can do to help get this integrated? I run cucumber on windows regularly using Capybara/SeleniumWD, and would like to switch to something headless.

petemounce avatar May 06 '11 15:05 petemounce

+1 - this is currently blocking me too

searls avatar May 23 '11 15:05 searls

@nusco: I played around with this today: Based on your suggestion it's possible to kill the remote (ruby) process, see https://gist.github.com/1044475 However, the java process still stays around … And this one is the real memory hog. Do you have ideas how this could be fixed?

noniq avatar Jun 24 '11 09:06 noniq

Unfortunately I don't. :( Like many people here, I'm not really a Windows person - I just happen to have a lot of customers using Windows, so I had to goof around on Google looking for a solution. I think it boils down to get the id of the Java process on launch, right?

nusco avatar Jun 24 '11 14:06 nusco

Another thing I've noticed in trying to get this to run on Cygwin/Win7 is that the "rescue Errno::ECONNREFUSED" big in the self.responsive? function is not catching Win7's new/different error: Errno::EPERM: Operation not permitted - connect(2)

whitelancer avatar Jul 20 '11 23:07 whitelancer

taskkill can be used to kill the ruby process and the child java process that it creates.

system("taskkill /PID #{remote_client.pid} /F /T")

fairly new to ruby so no idea if this is the best solution.

kieranmaine avatar Nov 08 '11 22:11 kieranmaine

We recently replaced our development machines with Macs, so this is no longer a issue for us – I leave the pull request open however, as it is at least a small improvent to the status quo :-)

noniq avatar Nov 10 '11 10:11 noniq