Daniel, Thanks much for the help & guidance. Thats a wonderful start and atleast now I know where to look. best, Daniel Frank wrote: > No. > Add the following line on the top of your script: > Dir.pwd > This will show you in which working directory ruby was started from. > Guessing from the screenshot I assume it will be C:\Program > Files\Notepad++. > Since you did not specify the path of test.txt, ruby will try to open a > file test.txt in that directory. > There are a couple of ways around: > a) Change the working directory before you start ruby. For example open > a command prompt, enter "cd /d g:\docs\l_ruby", then run the script: > "ruby analyzer.rb" > b) Change the working directory after you start ruby. Add a line before > your "File.read...." line: > Dir.chdir("g:/docs/l_ruby") > That will change the working directory to the one that contains the > test.txt file. > c) Figure out how to change the working directory that Notepad++ starts > ruby in. I have no idea how to do this. > I hope this will get you back on the track again. I suggest you have a > look at http://en.wikipedia.org/wiki/Working_directory to learn what a > working directory is, if you don't know already. It's essential to know > when writing scripts. -- Posted via http://www.ruby-forum.com/.