Top "Open-uri" questions

OpenURI is a Ruby module included in the standard library, which provides an easy-to-use wrapper for net/http, net/https and net/ftp.

How can I handle 503 errors with open-uri?

If a website returns a '503 service unavailable' error then open-uri throws an exception. For example: require 'open-uri' open('http://…

ruby error-handling open-uri
"No such file or directory @ rb_sysopen" using OpenURI

I've recently run into a problem using OpenURI. Every open method results in the following error: "No such file or …

ruby-on-rails ruby open-uri
How to Process Items in an Array in Parallel using Ruby (and open-uri)

I am wondering how i can go about opening multiple concurrent connections using open-uri? i THINK I need to use …

ruby multithreading open-uri fibers
Fast way to get remote image dimensions

I'm using the imagesize gem to check the sizes of remote images and then only push images that are big …

ruby-on-rails ruby image open-uri
Extract some JSON using Nokogiri

require 'open-uri' require 'json' require 'nokogiri' doc = Nokogiri::HTML(open("http://www.highcharts.com/demo/")) puts doc But I want …

ruby nokogiri open-uri
open-uri is not redirecing http to https

I am using Hpricot and OpenURI to parse webpages and extract URLs from them. When I get a link like "…

ruby rubygems hpricot open-uri
Ruby Proxy Authentication GET/POST with OpenURI or net/http

I'm using ruby 1.9.3 and trying to use open-uri to get a url and try posting using Net:HTTP Im trying …

ruby-on-rails ruby proxy open-uri net-http
Can't convert StringIO into String (TypeError) in Ruby

When I use the code below, I get the following error message: can't convert StringIO into String (TypeError) array_of_…

ruby zip open-uri
How do I add encoded query values to a URL?

I am looking for a convenient and functional way to add encoded values to a URL query string in Ruby. …

ruby uri urlencode open-uri ruby-1.9.3
Why does Ruby open-uri's open return a StringIO in my unit test, but a FileIO in my controller?

I inherited a Rails 2.2.2 app that stores user-uploaded images on Amazon S3. The attachment_fu-based Photo model offers a rotate …

ruby-on-rails ruby amazon-s3 imagemagick open-uri