Specs pass locally, but fail for Travis CI

You have some problem or other, but no debug output, so it's hard to tell what's wrong. I would eliminate the issues one by one by altering your tests to give you that output. You could have one of the following (or something else):

  • You may not be on the correct page because the navigation has failed
  • You may not have anything on the page except an error message
  • You may have something else on the page which is covering up the username field

Try adding a step that validates the page you are on:

expect(page).to have_current_path('/users/sign_up')

Or try adding a step that prints out the HTML for the page.

puts page.html

or if not...

fail page.html

You should find something of use to tell you why you cannot see the input you want to fill in.


Check whether TrevisCI can create test DB. For working with Travis CI, I had to create public test DB which TravisCI can use...


Can you post your spec_helper ? Also, the official documentation suggests another way to configure xvfb, have you checked http://docs.travis-ci.com/user/gui-and-headless-browsers/ ?