I'm stuck with 'open-uri'

V

Valen Onish

I'm trying 'open-uri' on Windows XP and my 'test_uri.rb' runs OK. But
when I transform 'test_uri.rb' in 'test_uri.rhtml' and run it on my
localhost I get an error in the last line:
/lib/ruby/1.8/net/http.rb:560:in `initialize': getaddrinfo:
non-recoverable failure in name resolution.
What is going on?

------------test_uri.rb--------------
require 'open-uri'
require 'rexml/document'
include REXML

page = open("E:/xampp/htdocs/my/MyRuby/rhtml/2360.xml") #local
file
page=open('http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml')
---------------------------------------------



========test_uri.rhtml=============
<%
require 'open-uri'
require 'rexml/document'
include REXML

page = open("E:/xampp/htdocs/my/MyRuby/rhtml/2360.xml") #local
file
page =
open('http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml')
%>
============================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,610
Members
45,254
Latest member
Top Crypto TwitterChannel

Latest Threads

Top