Collective Idea

Collective Idea Logo

Eric Milford

Install your own PhantomJS on Travis CI

By Eric Milford on October 17, 2012 in phantom-js and travis-ci

On a current project, we switched our javascript driver to Poltergeist, a driver for Capybara that allows you to run your tests in a headless browser provided by PhantomJS. Happy days and green dots locally, but our build server on Travis CI had a different opinion.

Failure/Error: And I am logged in as user ""
    PhantomJS version 1.6.1 is too old. You must use at least version 1.7.0

Fortunately Travis CI has made it easy and convenient to install any software you like on the virtual machine. So until the default is bumped to the required version of PhantomJS, add the following lines to your .travis.yml and you will be off and running with Poltergeist in no time.

  - wget                                                                                                                                                             
  - tar -xf phantomjs-1.7.0-linux-i686.tar.bz2                                                                                                                                                                                                
  - sudo rm -rf /usr/local/phantomjs                                                                                                                                                                                                          
  - sudo mv phantomjs-1.7.0-linux-i686 /usr/local/phantomjs
By Eric Milford on October 17, 2012 in phantom-js and travis-ci


  1. test website

    test website March 17, 2013

    I believe this web site has got some really fantastic info for everyone . “I like work it fascinates me. I can sit and look at it for hours.” by Jerome K. Jerome.

  2. Sujit Kumbhar

    Sujit Kumbhar July 10, 2015


    I tried above , but after adding above line into travis.yml my build is stopped.

    If i removed above line then travis build is complete.

    I am able to run my test on my local environment but not on travis.

Post a Comment

Contact Us

Find us on Google Maps
Collective Idea
44 East 8th Street, Suite 410
Holland, Michigan 49423 USA 42.790334-86.105251


Follow us on the Interwebs

We are currently available for medium and long term projects. Please get in touch if we can be of service.