Checkout a repo, brand new gemset, run the test suite which for sure is running green on at least 3 of your colleagues machines and Boom! the tests are not passing on yours!
And there it starts the infinite debugging.
One of the Cucumber tests not passing had a css selector like the following:
1 2 3 4 5 6 7 8
which had nothing strange in it; plus I could actually see in the browser, using save_and_open_page that the elements that Capybara was supposed to select, were actually there.
After some time shooting in the dark, reinstalling and banging the head against the desk, I figured that the problem should have been related to some system library I was using and it turned out I was right.
Capybara has a wrapper around our friend Nokogiri that wraps libxml2 and the only difference between my machine and my colleagues ones could have been exactly the version of libxml2. To prove the theory at that point, I just had to install and older version of libxml2 and reinstall nokogiri before running the test suite again:
1 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6
That was it! Tests running, all green! F@#k YEAH!
Now surely we can update the test suite to work with the latest libxml2 :P