Peter Vandenabeele wrote in post #1024204:
> On Thu, Sep 29, 2011 at 11:56 AM, Robert Klemme
> <shortcutter / googlemail.com>wrote:
>
>> > filearray = IO.readlines(filename)
>> >
>> Insert a line after "gets" like this:
>>
> I am not sure.
>
> I think it is a simple typo in that
>
>   filename1  (with a digit)
>
> is asked by the get, but
>
>   filename (without a digit)
>
> is used in the call to IO.readlines.
>
> IMHO, the code as shown above could never work with that typo ...

Yes, but if that were the case the error wouldn't be Errno::ENOENT.

The problem is the *content* of the filename1 variable, and that's what 
Robert is trying to get the OP to check, using

p filename1

or equivalently:

puts filename1.inspect

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