← Back to Upcase

Running a cucumber test I received the following err: No such file or directory - phantomjs --version


(Kim Khan) #1

PhantomJS returned non-zero exit status 127. Make sure phantomjs runs successfully on your system. You can test this by just running the phantomjs command which should give you a Javascript REPL. (Capybara::Poltergeist::PhantomJSFailed)

How do i troubleshoot this error?


(George Brocklehurst) #2

Poltergeist is built on PhantomJS, but PhantomJS isn’t working correctly. This part of the error message suggests what you should do next:

You can test this by just running the phantomjs command which should give you a Javascript REPL.

If you run the command phantomjs at the command line, you should see a prompt where you can type JavaScript commands:

phantomjs>

Try some simple maths:

phantomjs> 1 + 1
2

If running phantomjs doesn’t give you a prompt, you should get another, more specific error message so you can figure out where to go from there.


(Kim Khan) #3

Very useful information. Thanks!!
I solved the issue by installing phantomjs.