-
Notifications
You must be signed in to change notification settings - Fork 8
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
Cannot find phantomjs.exe on Windows #19
Comments
I ran Cliver in IRB and tried to verify the same program entries that are mentioned in the error message, without being able to reproduce the error.
|
If cliver can detect it in IRB, it's possible that you have multiple versions of cliver installed and the one activated from within poltergeist is an old version (e.g., running your tests via To see which versions you've got, run: gem list cliver To see which is activated by your bundle, inspect your project's |
Thank you very much for responding. I've checked my Gem repositories like you suggested and I have just the one version, v0.3.2 installed. That's also the version being referenced in my Gemfile.lock. I had to get past this problem, and since PhantomJS is clearly available on my computer, I monkey patched Cliver to "short circuit" the ShellCapture class by telling it which version I have available like this:
This works fine for now, but I would really be interested in finding a more permanent solution. I can supply you with more information if you want. E.g. I know that the call to Open3.popen3() in the initialize method of ShellCapture raises an exeption:
I don't know if that helps pinpointing the problem, but I can certainly try to provide you with whatever information you need. |
I'm glad you got unblocked; with 0.3.2 you can also set the I would be glad to review/merge a fix if you have the time to put one together, but I don't have a lot of spare time to actively hunt out issues on this project (and don't have a Windows VM with JRuby handy either). |
I'll dig into it, and let you know if I come up with a solution. Thanks. |
Seems like there is a problem with popen3 on windows in JRuby 9K. I have reported this as jruby/jruby#3948 . |
Encountered this as well, thanks for the workaround @elcubo ! |
Also encountered this issue. The patch described by @elcubo does work, however I'd be more inclined to see why it's doing this also. Because the values it modifies are local, there's no file we can dig into and fix that we can then upload easily (Or am I wrong here?) |
jruby/jruby#3948 is now solved: jruby/jruby#3948 (comment). It will be in the 9.1.3 release, but can be used via the nightly build as of now. Get it here: http://ci.jruby.org/ This issue can be closed. |
@elcubo What release is that sorry (The 9.1.3), I'm guessing it's not a ruby or phantom release? |
It's the upcoming JRuby version. |
Aha oki. This issue also exists in regular Ruby (Along with poltergeist and phantom). Is it likely that you'll be able to back-port this to regular ruby somehow via the cliver gem? I'm a Tester not a dev so apologies if that is a stupid thing to ask |
Hi @yaauie. Had a couple of tries at this recently. One issue raised because we know the Not sure if that would cause it not to detect. But it's worth a shot right? Also @elcubo , you mentioned this was fixed in JRuby, is there any plans for this to port down to regular ruby? This issue essentially means I can't test poltergeist without my monkey patch which is too frustrating to maintain cross branches. And because it's not everyone who gets this issue, it's not worth pushing up a monkeypatch to a repo to be cross-branch |
I can't say I've had any such problems as this on MRI Ruby. My understanding was that it was a JRuby specific problem, and it should work fine on MRI. At least the popen3 problem was JRuby specific. |
Sadly not, everything mentioned before is still an issue. Although I've re-read up about an Environment variable that can be set. Will wait for @yaauie to advise if this is worth trialling in regular Ruby |
@elcubo thank you for following up. I'm closing this ticket. @luke-hill I believe your issue is separate; although it has a similar result (cliver can't detect the version of an executable), if you're still experiencing this issue could you open a new bug with complete repro steps? It would be helpful to have your |
While running tests using JRuby, Capybara and Poltergeist, I get the following error:
The path to phantomjs.exe is correct and it is also part of my Windows path. Running phantomjs --version from the command prompt returns "2.1.1", so there is no doubt that the exe file is present and working.
Is there some kind of workaround that I can use to get around this problem (if it is indeed a bug, like the error message says)? Is the cause of the bug known, and are there any countermeasures? I'd really appreciate some help, as I am quite stuck.
The text was updated successfully, but these errors were encountered: