I'm having trouble following along with some of the examples in this
"Beginning Ruby(2nd Edition). I'm at the section where you learn about
I/O handling and tried to do one of the examples and got an error. Not
sure what I did wrong:

irb(main):001:0> File.open("olivertext.txt") do |f|
irb(main):002:1* puts f.gets
irb(main):003:1> end
Errno::ENOENT: No such file or directory - olivertext.txt
        from (irb):1:in `initialize'
        from (irb):1:in `open'
        from (irb):1
        from C:/Ruby193/bin/irb:12:in `<main>'

I tried to use the whole directory to find the file, and got this:

<"C:\Users\Al Baker\Documents\Programming\RuBy olivertext.txt") do |f|
irb(main):005:1* puts f.gets
irb(main):006:1> end
Errno::ENOENT: No such file or directory -
C:UsersAlBakerDocumentsProgrammingRuBy olivertext.txt
        from (irb):4:in `initialize'
        from (irb):4:in `open'
        from (irb):4
        from C:/Ruby193/bin/irb:12:in `<main>'
 help!

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