ruby – Cucumber测试无法启动时出现错误“显示套接字已被删除但锁定文件丢失..”

前端之家收集整理的这篇文章主要介绍了ruby – Cucumber测试无法启动时出现错误“显示套接字已被删除但锁定文件丢失..”前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
运行黄瓜后

bundle exec cucumber features/emails.feature:20

我收到了错误

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’

我正在运行MacOS 10.11.5,xquartz安装,第一次测试开始,我不能让它重新开始.有什么建议?

解决方法

完全披露:我不知道这里发生了什么,并希望有人向我解释,但运行以下命令可以使Xvfb和我的测试套件正常工作:
mkdir /tmp/.X11-unix
sudo chmod 1777 /tmp/.X11-unix
sudo chown root /tmp/.X11-unix/

我在这里找到了这个答案:
https://github.com/leonid-shevtsov/headless/issues/47(第一条评论)

原文链接:https://www.f2er.com/ruby/264693.html

猜你在找的Ruby相关文章