I've got some problems running capybara-webkit with the Headless gem, Xvfb and our ci server. We use this setup for automatic integration testing and javascript testing of our Ruby on Rails 3.2 app. During the tests it complains that
webkit_server: cannot connect to X server
But when I ps aux | grep Xvfb
deploy 1602 0.0 0.1 61696 1912 pts/2 S+ Jul10 0:00 /usr/bin/Xvfb :99 -screen 0 1280x1024x24 -ac
I see the Xvfb running. If I run the tests with --trace
it also only shows the error log above and I can't debug the error.
Any ideas how I could get some more information, or even a solution?
system "#{CliUtil.path_to("Xvfb")} :#{display} -screen 0 #{dimensions} -ac >/dev/null 2>&1 &"
, whereCliUtil.path_to("Xvfb")
refers to ``which #{app}.strip
. In my case the server returns/usr/bin/Xvfb
. Ok, I try to temporarly override this method, so that it returnsxvfb-run
instead. Maybe that helps – Pylos