Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small patch to make akephalos work on windows #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

noniq
Copy link

@noniq noniq commented Feb 14, 2011

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.

@nusco
Copy link

nusco commented Mar 27, 2011

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

@nusco
Copy link

nusco commented Mar 30, 2011

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.

@petemounce
Copy link

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.

@searls
Copy link

searls commented May 23, 2011

+1 - this is currently blocking me too

@noniq
Copy link
Author

noniq commented Jun 24, 2011

@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?

@nusco
Copy link

nusco commented Jun 24, 2011

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?

@whitelancer
Copy link

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)

@kieranmaine
Copy link

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.

@noniq
Copy link
Author

noniq commented Nov 10, 2011

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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants