7

After running cucumber

bundle exec cucumber features/emails.feature:20

I am getting error

Display socket is taken but lock file is missing - check the Headless troubleshooting guide (Headless::Exception) /Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/headless-2.2.0/lib/headless.rb:195:in ensure_xvfb_is_running' /Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/headless-2.2.0/lib/headless.rb:184:in launch_xvfb' /Users/me/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/headless-2.2.0/lib/headless.rb:172:in `block in pick_available_display'

I am running MacOS 10.11.5, xquartz installed, test started first time and I cant make it to start again. Any suggestions?

Kano
  • 93
  • 7

1 Answers1

10

Full disclosure: I have no idea what is happening here, and would love for someone to explain it to me, but running the following commands gets Xvfb and my test suite working correctly:

mkdir /tmp/.X11-unix
sudo chmod 1777 /tmp/.X11-unix
sudo chown root /tmp/.X11-unix/

I found this answer here: https://github.com/leonid-shevtsov/headless/issues/47 (first comment)

jj57347
  • 322
  • 2
  • 10