RSpec测试失败 - 显示套接字但缺少锁定文件

时间:2016-11-17 02:44:35

标签: ruby-on-rails websocket lockfile

我试图在我的Rails应用程序中运行RSpec测试并继续收到以下错误:

:> rspec spec/controllers/api/v0/buying_strategies_controller_spec.rb
    WARN: Unresolved specs during Gem::Specification.reset:
      activemodel (< 6.0, >= 3.0, >= 4.2.0)
      activesupport (>= 3.0, >= 4.2.0)
   WARN: Clearing out unresolved specs.
   Please report a bug if this causes problems.
/Users/christopherdanella/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/headless-2.3.1/lib/headless.rb:207:in `ensure_xvfb_launched': Display socket is taken but lock file is missing - check the Headless troubleshooting guide (Headless::Exception)
from /Users/christopherdanella/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/headless-2.3.1/lib/headless.rb:195:in `launch_xvfb'

此处的问题排查指南http://www.rubydoc.info/github/leonid-shevtsov/headless#Display_socket_is_taken_but_lock_file_is_missing只是说它是一种特殊情况并且可以解决问题。有什么想法吗?

1 个答案:

答案 0 :(得分:0)

您可以尝试清理宝石,似乎您拥有相同宝石的许多版本,并且rspec不知道要使用哪个宝石。

从另一个QA看这个答案: https://stackoverflow.com/a/18127613/7219974