gpt4 book ai didi

ruby-on-rails - 带有 Selenium 的 Capybara 抛出一个 Net::ReadTimeout:Net::ReadTimeout

转载 作者:行者123 更新时间:2023-11-28 21:00:32 25 4
gpt4 key购买 nike

我今天放假回来,我的 capybara 和 Selenium 动力测试抛出了这个错误:

Net::ReadTimeout: Net::ReadTimeout
/Users/pupeno/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/protocol.rb:158:in `rescue in rbuf_fill'
/Users/pupeno/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/protocol.rb:152:in `rbuf_fill'
/Users/pupeno/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/protocol.rb:134:in `readuntil'
/Users/pupeno/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/protocol.rb:144:in `readline'
/Users/pupeno/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http/response.rb:39:in `read_status_line'
/Users/pupeno/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http/response.rb:28:in `read_new'
/Users/pupeno/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:1408:in `block in transport_request'
/Users/pupeno/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:1405:in `catch'
/Users/pupeno/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:1405:in `transport_request'
/Users/pupeno/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:1378:in `request'
/Users/pupeno/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:1371:in `block in request'
/Users/pupeno/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:853:in `start'
/Users/pupeno/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/http.rb:1369:in `request'
/Users/pupeno/.rvm/gems/ruby-2.1.5@watu/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:83:in `response_for'
/Users/pupeno/.rvm/gems/ruby-2.1.5@watu/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:39:in `request'
/Users/pupeno/.rvm/gems/ruby-2.1.5@watu/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
/Users/pupeno/.rvm/gems/ruby-2.1.5@watu/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:640:in `raw_execute'
/Users/pupeno/.rvm/gems/ruby-2.1.5@watu/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:618:in `execute'
/Users/pupeno/.rvm/gems/ruby-2.1.5@watu/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:112:in `get'
/Users/pupeno/.rvm/gems/ruby-2.1.5@watu/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/common/navigation.rb:14:in `to'
/Users/pupeno/.rvm/gems/ruby-2.1.5@watu/gems/capybara-2.4.4/lib/capybara/selenium/driver.rb:45:in `visit'
/Users/pupeno/.rvm/gems/ruby-2.1.5@watu/gems/capybara-2.4.4/lib/capybara/session.rb:227:in `visit'
/Users/pupeno/.rvm/gems/ruby-2.1.5@watu/gems/capybara-2.4.4/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'

基本上,在我离开之前没有任何改变,这些测试只适用于其他人(即其他计算机)。为了让它们再次工作,我升级了 Firefox,我在/etc/hosts 中添加了一些主机名以删除 DNS 查找,升级了所有 gem(包括 capybara )。我的想法用完了。

环境是OS X 10.9.5。为了以防万一,我重新启动了几次。我正在运行 Ruby 2.1.5、Rails 3.2.21、MiniTest 4.7.5。

还有其他想法可以尝试吗?

最佳答案

gem install 'eventmachine'  -v 1.0.3

如果您有 1.0.3 以外的版本,请将其卸载并安装指定版本。

可能是,这解决了问题。

关于ruby-on-rails - 带有 Selenium 的 Capybara 抛出一个 Net::ReadTimeout:Net::ReadTimeout,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27361284/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com