Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Uri to absolute/relative path

Reply
Thread Tools

Uri to absolute/relative path

 
 
App Ra
Guest
Posts: n/a
 
      10-18-2006
Hello, I'm new to ruby but so far my experience with Ruby has been
great. I'm unable to open an uri based on the file path.

This works
require 'open-uri'
open("http://www.ruby-lang.org/") {|f|
f.each_line {|line| p line}
}


but this doesn't

require 'open-uri'
open("file:c://test/test.txt") {|f|
f.each_line {|line| p line}
}

Can Ruby uri class open up a file schema?

Thanks,
apparna


--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java.net.URI.relativize(java.net.URI) not really working Stanimir Stamenkov Java 1 08-17-2005 06:24 PM
Help with error: "Invalid URI: The format of the URI could not be determined." Simon Harris ASP .Net 0 05-10-2005 04:33 PM
Re: XSLT: Relative URI "my.dtd" can not be resolved without a base URI etheriau XML 1 08-23-2004 01:54 PM
XSLT: Relative URI "my.dtd" can not be resolved without a base URI Pavel XML 2 08-03-2004 11:40 PM
Invalid URI: The format of the URI could not be determined. Joe Curry ASP .Net Web Services 0 10-08-2003 04:11 PM



Advertisments