我有ruby 1.8.7和rails 2.3.5以及运行功能方案时。我收到以下错误。
/usr/lib/ruby/1.8/net/http.rb:560:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
from /usr/lib/ruby/1.8/net/http.rb:560:in `open'
from /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
from /usr/lib/ruby/1.8/timeout.rb:53:in `timeout'
from /usr/lib/ruby/1.8/timeout.rb:93:in `timeout'
from /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
from /usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
from /usr/lib/ruby/1.8/net/http.rb:542:in `start'
from /usr/lib/ruby/gems/1.8/gems/right_http_connection-1.3.0/lib/net_fix.rb:129:in `request'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/remote/http/default.rb:73:in `response_for'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/remote/http/default.rb:41:in `request'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/remote/bridge.rb:476:in `raw_execute'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/remote/bridge.rb:454:in `execute'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/remote/bridge.rb:177:in `quit'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/firefox/bridge.rb:40:in `quit'
from /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/common/driver.rb:156:in `quit'
from /usr/lib/ruby/gems/1.8/gems/capybara-0.4.0/lib/capybara/driver/selenium_driver.rb:88
答案 0 :(得分:1)
你有一个非常旧版本的selenium-webdriver
(0.02)。从那以后已经修复了很多,所以你可能会遇到很多问题。旧版本也不支持现代浏览器,所以如果你想在现代版本的Firefox上进行测试,你应该更新这个gem。
答案 1 :(得分:0)
看起来Selenium无法连接到您的测试浏览器。使用最新的Firefox时遇到了这个问题。
当我降级到FF 3.0.6时,它开始工作。