Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cliver and PhantomJS error with update to MacOS Sierra

I updated from OSX El Capitan to MacOS Sierra and began seeing PhantomJS errors.

$ rspec <some feature test
... The detector #<struct Cliver::Detector command_arg=nil, version_pattern=nil> failed to detect theversion of the executable at '/app/node_modules/phantomjs-prebuilt/bin/phantomjs'

How can I resolve this?

like image 249
Anthony To Avatar asked Dec 15 '22 02:12

Anthony To


1 Answers

After some playing around, I realized that $ phantomjs --version was not returning anything. Strange. I also checked both

$ brew list
$ npm ls

and saw that neither listed phantomjs as one of their packages. Looks like I had an issue with my phantomjs install. I decided to do a completely fresh install of phantomjs.

I began by determining where phantomjs is installed:

$ which phantomjs
/usr/local/bin/phantomjs

Remove it:

$ rm -rf /usr/local/bin/phantomjs
$ phantomjs -v
-bash: /usr/local/bin/phantomjs: No such file or directory

Good. Now install phantomjs with npm:

$ npm -g install phantomjs-prebuilt
$ phantomjs -v
2.1.1

This looks promising. Lets run our spec again:

$ rspec <some feature test>
1 example, 0 failures

Success.

like image 60
Anthony To Avatar answered Dec 30 '22 08:12

Anthony To