需要帮忙。使用 ruby(不是 rails)和 capybara-webkit gem 编写脚本。在 EC2 和 Linode 上都进行了检查,并且此错误仍然存在。
webkit_server: cannot connect to X server
/usr/lib/ruby/gems/1.8/gems/capybara-webkit-0.12.1/lib/capybara/driver/webkit/connection.rb:103:in
attempt_connect'
/usr/lib/ruby/gems/1.8/gems/capybara-webkit-0.12.1/lib/capybara/driver/webkit/connection.rb:96:in
connect'
/usr/lib/ruby/1.8/timeout.rb:62:in timeout'
/usr/lib/ruby/gems/1.8/gems/capybara-webkit-0.12.1/lib/capybara/driver/webkit/connection.rb:94:in
connect'
/usr/lib/ruby/gems/1.8/gems/capybara-webkit-0.12.1/lib/capybara/driver/webkit/connection.rb:17:in initialize'
/usr/lib/ruby/gems/1.8/gems/capybara-webkit-0.12.1/lib/capybara/driver/webkit.rb:26:in
new'
/usr/lib/ruby/gems/1.8/gems/capybara-webkit-0.12.1/lib/capybara/driver/webkit.rb:26:in initialize'
/usr/lib/ruby/gems/1.8/gems/capybara-webkit-0.12.1/lib/capybara/webkit.rb:5:in
new'
/usr/lib/ruby/gems/1.8/gems/capybara-webkit-0.12.1/lib/capybara/webkit.rb:5
/usr/lib/ruby/gems/1.8/gems/capybara-1.1.2/lib/capybara/session.rb:61:in call'
/usr/lib/ruby/gems/1.8/gems/capybara-1.1.2/lib/capybara/session.rb:61:in
driver'
/usr/lib/ruby/gems/1.8/gems/capybara-1.1.2/lib/capybara/session.rb:157:in visit'
/usr/lib/ruby/gems/1.8/gems/capybara-1.1.2/lib/capybara/dsl.rb:161:in
visit'
谢谢