search for: open_uri

Displaying 10 results from an estimated 10 matches for "open_uri".

2008 Jun 24
0
open_uri on invalid URLs
Hi I am using open(public_url) in one of the modules and it works fine as long as public_url is a valid URL. But when i give an invalid URL, i do not have control on error raised- My application fails and log shows : Errno::ENOENT) \\\"No such file or directory How can i catch these exceptions? Regards, Sandeep G -- Posted via http://www.ruby-forum.com/.
2009 Jan 28
2
open_uri failure on good uri.
I am trying to open a URI using doc = Nokogiri::HTML(open(url)). I get the following error: URI::InvalidURIError: bad URI(is not URI?): http://www.mauipropertytax.com/Datalets.asp?mnu=PSearch&submnu=Profile&pin=390350950000&tp=2&cp=1&State=1|1|*&item=1 from /usr/local/ruby/lib/ruby/1.8/uri/common.rb:436:in `split'' from
2007 Oct 19
3
Stubbing a Kernel method?
Is it possible to stub a Kernel method? I''m specifically interested in the ''open'' method to test some code using open-uri. I''ve tried: Kernel.should_receive(:open).with(''filename'').and_return(''data'') However, this doesn''t seem to work. Any suggestions would be appreciated. --Paul
2006 Apr 14
2
Markaby trunk broken?
...TTPError) from /usr/local/lib/ruby/1.8/open-uri.rb:629:in `buffer_open'' from /usr/local/lib/ruby/1.8/open-uri.rb:167:in `open_loop'' from /usr/local/lib/ruby/1.8/open-uri.rb:165:in `open_loop'' from /usr/local/lib/ruby/1.8/open-uri.rb:135:in `open_uri'' from /usr/local/lib/ruby/1.8/open-uri.rb:531:in `open'' from /usr/local/lib/ruby/1.8/open-uri.rb:86:in `open'' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/commands/plugin.rb:843:in `download'' from /usr/local/lib/ruby/gems...
2006 Mar 24
8
[OT] Does Net::HTTP support secure connections ?
Hi ! I''m trying to connect to an https URL, but it seems it doesn''t work. Has anyone successfully connected from Ruby to an HTTPS server ? Thanks ! -- Fran?ois Beausoleil http://blog.teksol.info/
2008 May 17
1
Can someone help with this error?
...en-uri.rb:626:in `buffer_open'' from /usr/lib/ruby/1.8/open-uri.rb:164:in `open_loop'' from /usr/lib/ruby/1.8/open-uri.rb:162:in `catch'' from /usr/lib/ruby/1.8/open-uri.rb:162:in `open_loop'' from /usr/lib/ruby/1.8/open-uri.rb:132:in `open_uri'' from /usr/lib/ruby/1.8/open-uri.rb:528:in `open'' from /usr/lib/ruby/1.8/open-uri.rb:30:in `open'' from /home/raghus/public_html/feedflix.com/ff/lib/netflix.rb:467:in`process_netflix_reviews'' ... 21 levels... from /usr/lib/...
2009 Mar 17
7
urgent please :HTTPS html parsing
...rom /usr/lib/ruby/1.8/open-uri.rb:616:in `buffer_open'' from /usr/lib/ruby/1.8/open-uri.rb:164:in `open_loop'' from /usr/lib/ruby/1.8/open-uri.rb:162:in `catch'' from /usr/lib/ruby/1.8/open-uri.rb:162:in `open_loop'' from /usr/lib/ruby/1.8/open-uri.rb:132:in `open_uri'' from /usr/lib/ruby/1.8/open-uri.rb:518:in `open'' from /usr/lib/ruby/1.8/open-uri.rb:30:in `open'' from demo.rb:15:in `valid'' from demo.rb:93 I''m also not able to load the html data gmail, youtube etc. Is it because i''m using hpricot. I...
2006 Apr 05
0
markaby, installation problem,
...) from /usr/local/lib/ruby/1.8/open-uri.rb:629:in `buffer_open'' from /usr/local/lib/ruby/1.8/open-uri.rb:167:in `open_loop'' from /usr/local/lib/ruby/1.8/open-uri.rb:165:in `open_loop'' from /usr/local/lib/ruby/1.8/open-uri.rb:135:in `open_uri'' from /usr/local/lib/ruby/1.8/open-uri.rb:531:in `open'' from /usr/local/lib/ruby/1.8/open-uri.rb:86:in `open'' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/commands/plugin.rb:843:in `download'' from /usr/local...
2007 Apr 28
0
script/plugin and http-proxy with Authentication
...6:in `buffer_open'' from c:/ruby/lib/ruby/1.8/open-uri.rb:164:in `open_loop'' from c:/ruby/lib/ruby/1.8/open-uri.rb:162:in `catch'' from c:/ruby/lib/ruby/1.8/open-uri.rb:162:in `open_loop'' from c:/ruby/lib/ruby/1.8/open-uri.rb:132:in `open_uri'' from c:/ruby/lib/ruby/1.8/open-uri.rb:528:in `open'' from c:/ruby/lib/ruby/1.8/open-uri.rb:30:in `open'' from c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/ plugin.rb:687:in `scrape'' from c:/ruby/lib/ruby/gems/1.8/gems/rai...
2006 Jun 26
2
RoR authentication with IBM Notes/Domino
...sion. # To store just the whole user model in the session: # # def current_user # session[:user] # end # def current_user if session[:user] @current_user ||= session[:user] else begin tokenstring = "LtpaToken=" tokenstring = tokenstring + cookies[:LtpaToken] if cookies[:LtpaToken] OpenURI.open_uri(''http://[your domino server here]/[your database]/[some page that returns the username]'', "Cookie" => tokenstring) do |http| @current_user = http.read.strip end #rescue end end end end On the domino side, you just need to create a database and then a page within the...