it looks like you're executing the script from a different directory than it exists in. Try cd-ing into the script's directory before executing it, or put an absolute path to text.txt into your script.
Look up how the current working directory of a process is set.
···
On Aug 28, 2012, at 9:46 PM, Pepe Pew <lists@ruby-forum.com> wrote:
Hello, I need your help.
I just made the file "analyzer.rb" and placed on a folder.
This file has the code:
Hello Jam, Andriy Andreyev and Robert Klemme, thank you for this help.
The file was really on same fold.
The only thing I did it was change the file "text.txt" for "file.txt" of
the file name and on the ruby cody, then it worked
I don't understood why "text.txt" was not working, but what matters is
that now it worked.
Thank you a lot!