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.

Ruby - How to get the name of a file with open-uri?

I want to download a music file by this way: require 'open-uri' source_url = "http://soundcloud.com/stereo-foo/cohete-amigo/download" …

ruby http url uri open-uri
how to test open-uri url exist before processing any data

I'm trying to process content from a list of links using "open-uri" in ruby (1.8.6), but the bad thing happens when …

ruby open-uri
Rails 3.2.17 Runtime Error Redirection Forbidden facebook

I have this code I use to get avatars from Facebook... if auth.info.image.present? user.update_attribute(:avatar, …

facebook redirect ruby-on-rails-3.2 open-uri
`write': "\xCF" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError) while writing to file from url

I am getting error: write': "\xCF" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError) from line: open(uri) {|url_file| tempfile.…

ruby ruby-on-rails-5 open-uri
Convert latin1 string to utf8?

how can I convert a string, that contains latin1 characters to utf8? The string is a document, that is opened …

ruby nokogiri character-encoding open-uri