ruby-1.9.3

Watir. Scroll to a certain point of the page

混江龙づ霸主 提交于 2019-11-30 13:24:24
问题 I am trying to automate an online survey on a website but I get this error each time: Selenium::WebDriver::Error::UnknownError: unknown error: Element is not clickable at point (561, 864). Other element would receive the click: a id="habla_oplink_a" class="habla_oplink_a_normal hbl_pal_header_font_size hbl_pal_title_fg " What I need to understand is how I can scroll to a certain point of the page so that my script can resume filling out the survey on the page. This is my code that manages to

OpenSSL trouble with Ruby 1.9.3

烂漫一生 提交于 2019-11-30 12:44:32
I am having a semi-serious problem with OpenSSL 1.0.1 + Ruby 1.9.3 on Ubuntu 12.04. All rubies are installed with rvm require 'uri' require 'net/http' require 'net/https' endpoint = "https://secure.mmoagateway.com/api/transact.php" RUBY_184_POST_HEADERS = { "Content-Type" => "application/x-www-form-urlencoded" } body = "orderid=ae5dd847d9f31209cbffeeea076ed966&orderdescription=Active+Merchant+Remote+Test+Purchase&ccnumber=4111111111111111&ccexp=0913&cvv=123&company=Widgets+Inc&address1=1234+My+Street&address2=Apt+1&city=Ottawa&state=ON&zip=K1C2N6&country=CA&phone=%28555%29555-5555&firstname=

Ruby on Linux PTY goes away without EOF, raises Errno::EIO

旧街凉风 提交于 2019-11-30 11:48:40
I'm writing some code which takes a file, passes that file to one of several binaries for processing, and monitors the conversion process for errors. I've written and tested the following routine on OSX but linux fails for reasons about which I'm not clear. #run the command, capture the output so it doesn't display PTY.spawn(command) {|r,w,pid| until r.eof? do ##mark puts r.readline end } The command that runs varies quite a lot and the code at the ##mark has been simplified into a local echo in an attempt to debug the problem. The command executes and the script prints the expected output in

Error installing ruby 1.9.3

好久不见. 提交于 2019-11-30 10:17:52
I'm trying to install Ruby 1.9.3 using rvm. However, when I type: rvm install 1.9.3 I get the following error: ERROR: Error running 'make ', please read /Users/nick/.rvm/log/ruby-1.9.3-rc1/make.log ERROR: There has been an error while running make. Halting the installation. I'm running Mac OS X Lion and my current version of Ruby is 1.9.2. Edit: make.log: make[1]: Entering directory `/Users/nick/.rvm/src/ruby-1.9.3/ext/readline' /usr/bin/gcc-4.2 -I. -I../../.ext/include/x86_64-darwin11.0.0 -I../.././include -I../.././ext/readline -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/nick/.rvm/usr/include -D

Watir. Scroll to a certain point of the page

最后都变了- 提交于 2019-11-30 07:23:31
I am trying to automate an online survey on a website but I get this error each time: Selenium::WebDriver::Error::UnknownError: unknown error: Element is not clickable at point (561, 864). Other element would receive the click: a id="habla_oplink_a" class="habla_oplink_a_normal hbl_pal_header_font_size hbl_pal_title_fg " What I need to understand is how I can scroll to a certain point of the page so that my script can resume filling out the survey on the page. This is my code that manages to fill out a portion of the survey but fails when it reaches a row which is not in view inside the

gem install pg can not bind to libpq

自闭症网瘾萝莉.ら 提交于 2019-11-30 06:25:00
问题 After upgrading to Ruby 1.9.3 (from 1.9.2 using system RVM) on Ubuntu 10.04.3, I removed all of my gems, and attempted to reinstall pg (ala bundle install pg ). It then threw an error and informed me that I should look at mkmf.log, both of which are included in this gist: https://gist.github.com/d05a81701d968895c730 libpq-dev, libpq5, and postgresql-client are all installed and working correctly. Pointing gem at pg_config, and the include and bin directories directly does not appear to change

install ruby 1.9.3 using rvm on ubuntu [duplicate]

点点圈 提交于 2019-11-29 23:10:11
Possible Duplicate: Ruby 1.9.2 and Rails 3 cannot open rails console I have already installed rvm and ruby 1.9.2, both working properly. Using rvm version 1.10.2. I previously installed the rvm packages readline/zlib, but now I'm having big troubles with readline now. I'm trying to install ruby 1.9.3 in rvm, but I always end up having readline not found. I tried to follow different solutions: rvm remove 1.9.3 rvm pkg install readline rvm install 1.9.3 --with-readline-dir=$rvm_path/usr/ \ --with-zlib-dir=$rvm_path/usr/ rvm use 1.9.3 rvmsudo gem install bundler bundle install (all gems installed

What are the differences between lazy, greedy and possessive quantifiers?

谁都会走 提交于 2019-11-29 21:46:04
问题 How do the following quantifiers differ - with respect of scenarios, speed, etc. ? , ?? and ?+ all match 0 or 1 times . * , *? and *+` all match 0 or more times . + , +? and ++ all match 1 or more times . ? , * and + are greedy . ?? , *? and +? are reluctant/lazy . ?+ , *+ and ++ are possessive . Can anyone help me to understand what these terms mean? Why are there three variations of each quantifier for the same job? 回答1: Take the string aaaab and see how the following regexes match it:

Convert a string to regular expression ruby

﹥>﹥吖頭↗ 提交于 2019-11-29 20:54:31
I need to convert string like "/[\w\s]+/" to regular expression. "/[\w\s]+/" => /[\w\s]+/ I tried using different Regexp methods like: Regexp.new("/[\w\s]+/") => /\/[w ]+\// , similarly Regexp.compile and Regexp.escape . But none of them returns as I expected. Further more I tried removing backslashes: Regexp.new("[\w\s]+") => /[w ]+/ But not have a luck. Then I tried to do it simple: str = "[\w\s]+" => "[w ]+" It escapes. Now how could string remains as it is and convert to a regexp object? Looks like here you need the initial string to be in single quotes (refer this page ) >> str = '[\w\s]+

OpenSSL trouble with Ruby 1.9.3

两盒软妹~` 提交于 2019-11-29 18:07:01
问题 I am having a semi-serious problem with OpenSSL 1.0.1 + Ruby 1.9.3 on Ubuntu 12.04. All rubies are installed with rvm require 'uri' require 'net/http' require 'net/https' endpoint = "https://secure.mmoagateway.com/api/transact.php" RUBY_184_POST_HEADERS = { "Content-Type" => "application/x-www-form-urlencoded" } body = "orderid=ae5dd847d9f31209cbffeeea076ed966&orderdescription=Active+Merchant+Remote+Test+Purchase&ccnumber=4111111111111111&ccexp=0913&cvv=123&company=Widgets+Inc&address1=1234