Timeout:Error

Issue: Our website is very slow in loading a page after you enter a user id and password. To counteract this, I tried to enter a "Sleep" statement, in addition to a wait_until_present method. The webpage loads usually after about 70 seconds, but I get a timeout after 60 seconds. Why would this occur if I have a 90 second sleep statement in addition to the default 60 seconds for "

超时错误:

问题:在输入用户名和密码后,我们的网站在加载页面时速度很慢。 为了抵消这一点,除了wait_until_present方法之外,我尝试输入“睡眠”语句。 网页通常在大约70秒后加载,但是我在60秒后得到超时。 为什么会发生这种情况,除了“wait_until_present”的缺省60秒之外,还有90秒的睡眠声明? RB文件中的代码: 输入用户名和密码 @browser.driver.find_element(id: "ctl00_ContentPlaceHolder1_Wizard1_txtUserName").send_keys

ruby

在服务器启动时发生奇怪的错误,请查看日志 umair-2:game-minion umairejaz$ rails server /Library/Ruby/Gems/1.8/gems/railties-3.1.0.rc5/lib/rails/script_rails_loader.rb:11: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:136: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777

红宝石

在服务器启动时发生奇怪的错误,请查看日志 umair-2:game-minion umairejaz$ rails server /Library/Ruby/Gems/1.8/gems/railties-3.1.0.rc5/lib/rails/script_rails_loader.rb:11: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:136: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777

Ruby confluence4r examples

I cannot find where to download the confluence4r gem and it doesn't work when I do: gem install confluence4r I downloaded one here: http://confluence.atlassian.com/display/DISC/Confluence4r I can login server = Confluence::RPC.new("http://wiki/") server.login("username","password") but once I do anything else it fails server.getSpace("key") but wait.. I do it a 2nd time and it works..

Ruby confluence4r的例子

我无法找到下载confluence4r gem的位置,但在我这样做时无法正常工作: gem install confluence4r 我在这里下载了一个:http://confluence.atlassian.com/display/DISC/Confluence4r 我可以登录 server = Confluence::RPC.new("http://wiki/") server.login("username","password") 但是一旦我做了其他事情就会失败 server.getSpace("key") 但是等等..我第二次这样做,它可以工作... server.getSpace("key") {"name"=&g

require.rb:55:in `require': cannot load such file error

I'm using Ruby version 1.9.3 at the moment (although I get the same issue with Ruby 2.0.0). On Windows 7 64-bit. I'm following 'The Cucumber Book' and got stuck at the chapter 7.2 - "Removing Duplication with Transforms". My folder structure is as follows: cash_withdrawal cash_withdrawalGemfile cash_withdrawalGemfile.lock cash_withdrawalfeatures cash_withdrawalfeatur

require.rb:55:在'require'中:无法加载这样的文件错误

我目前使用的是Ruby 1.9.3版(尽管我在Ruby 2.0.0中遇到同样的问题)。 在Windows 7 64位上。 我正在关注“黄瓜书”,并陷入了第7.2章“用变换去除重复”中。 我的文件夹结构如下所示: cash_withdrawal cash_withdrawalGemfile cash_withdrawalGemfile.lock cash_withdrawalfeatures cash_withdrawalfeaturescash-withdrawal.feature cash_withdrawalfeaturesstep_definitions cash_withdrawalfeaturesstep_definitionscash_with

Selenium w/ Ruby timing out when trying http operations

Sometimes, not always, when trying to do Selenium driver operations in Ruby, mysterious timeouts will be thrown with the stacktrace showing '/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue in rbuf_fill'' as the error. After looking into this, it is a bug in the ruby http module, and the most common answer to this problem is to change the http @rea

尝试http操作时,Selenium w / Ruby会超时

有时,并不总是,当试图在Ruby中执行Selenium驱动程序操作时,会在堆栈跟踪显示'/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/时引发神秘超时net / protocol.rb:146:在'rescue in rbuf_fill''中作为错误。 在研究这个之后,它是ruby http模块中的一个bug,对这个问题最常见的答案是将http @read_timeout更改为500左右(从60开始)。 但是,由于我正在运行一个相当大的测试套件,这可能会导致测试

Ruby networking problem on windows

I am running windows XP with ruby 1.8.6 patchlevel 111. I am using HTTP to connect to a remote server and it has been running fine. All of a sudden it started to through the exception listed below (I did not change any code since the last time I ran it successfully). Does anybody know what is going on? c:/ruby/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill': execution expired (Timeout::E rror)

在Windows上的Ruby网络问题

我运行Windows XP的红宝石1.8.6 patchlevel 111.我使用HTTP连接到远程服务器,它一直运行良好。 突然之间,它开始通过下面列出的例外(自从我上次成功运行后,我没有更改任何代码)。 有人知道发生了什么吗? c:/ruby/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill': execution expired (Timeout::E rror) from c:/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout' from c:/ruby/lib/ruby/1.8/timeout.rb:76:i

What are the differences between checking if block

I have a ruby method that needs to check if a block was passed to it. A colleague is suggesting that simply checking if block.nil? is slightly faster in performance and works for named blocks. This is already quite annoying since he is using the named block and invoking it using block.call rather than yield which has been shown to be significantly faster, since named blocks are more easy to un

检查块是否有区别

我有一个ruby方法需要检查一个块是否传递给它。 一位同事建议简单地检查block.nil? 性能略快,适用于命名模块。 这已经很烦人了,因为他使用的是命名块并使用block.call调用它,而不是显示速度更快的yield ,因为命名块在可读性方面更容易理解。 版本1: def named_block &block if block.nil? puts "No block" else block.call end end 版本2: def named_block &block if !block_given?

bundler won't run (no

I was fiddling around with the --deployment option on my ruby app. After that I wanted to add another gem to my app. I added it to the gemspec, and ran bundle install but the new gem didn't get installed. I deleted the vendor cache, .bundle, Gemfile.lock and tried again, and got the error I expected: You are trying to install in deployment mode after changing your Gemfile. Run bundle in

捆绑商不会运行(不

在我的ruby应用程序中,我正在摆弄--deployment选项。 之后,我想添加另一个宝石到我的应用程序。 我将它添加到gemspec,并运行bundle安装,但新的gem没有安装。 我删除了供应商缓存,.bundle,Gemfile.lock并再次尝试,并得到我预期的错误: 您正在尝试在更改Gemfile后以部署模式进行安装。 在别处运行bundle install ,并将更新的Gemfile.lock添加到版本控制。 ... 我以前见过这个,所以我开始使用--no-deployment标

Update just one gem with bundler

I use bundler to manage dependencies in my rails app, and I have a gem hosted in a git repository included as followed: gem 'gem-name', :git => 'path/to/my/gem.git' To update this gem, I execute bundle update but it also updates all the gem mentioned in Gemfile. So what is the command to update just one specific gem? Here you can find a good explanation on the difference between Update

使用捆绑器更新一个宝石

我使用bundler来管理我的rails应用程序中的依赖项,并且我拥有一个包含在git存储库中的gem,如下所示: gem 'gem-name', :git => 'path/to/my/gem.git' 为了更新这个gem,我执行了bundle update但它也更新了Gemfile中提到的所有gem。 那么,更新一个特定宝石的命令是什么? 在这里你可以找到一个很好的解释之间的区别 更新gem和依赖关系: bundle update gem-name 要么 只更新宝石: bundle update --source gem-

Rails rdoc Gem error/corruption issue

I'm getting the below error message when creating a new rails app. Bundler::GemspecError: Could not read gem at /Users/xyz/.rvm/gems/ruby-2.1.1/cache/rdoc-4.2.0.gem. It >may be corrupted. An error occurred while installing rdoc (4.2.0), and Bundler cannot continue. Make sure that gem install rdoc -v '4.2.0' succeeds before bundling. I am on Ruby 2.1.1 and Rails 4.1.6. I hav

Rails rdoc Gem错误/腐败问题

创建新的rails应用程序时,出现以下错误消息。 Bundler :: GemspecError:无法读取/Users/xyz/.rvm/gems/ruby-2.1.1/cache/rdoc-4.2.0.gem处的gem。 它>可能已损坏。 安装rdoc(4.2.0)时发生错误,并且Bundler无法继续。 在捆绑之前确保gem install rdoc -v '4.2.0'成功。 我在Ruby 2.1.1和Rails 4.1.6上。 我努力了: gem install rdoc -v '4.2.0'; no change. gem install rdoc; no change. gem install r