P
Parv G.
I'm trying to read/write a text file.
code:
$LOAD_PATH << "c:/path/to/resource/folder"
file = File.new('resources/testResults.txt', "a")
file.puts results
I keep on getting an error: "...in `initialize': No such file or
directory - ./resources/TestResults.txt (Errno::ENOENT)", when i run
this file from SciTE (the editor that comes with ruby on windows, BUT
when i run this from eclipse (RDT) the script works just fine.
I really would like to avoid mixing in full file paths in my code.
Can somebody offer some suggestions?
Why isn't $LOAD_PATH working for me, even though i see the path i need
in $LOAD_PATH?
Thanks,
Parv
code:
$LOAD_PATH << "c:/path/to/resource/folder"
file = File.new('resources/testResults.txt', "a")
file.puts results
I keep on getting an error: "...in `initialize': No such file or
directory - ./resources/TestResults.txt (Errno::ENOENT)", when i run
this file from SciTE (the editor that comes with ruby on windows, BUT
when i run this from eclipse (RDT) the script works just fine.
I really would like to avoid mixing in full file paths in my code.
Can somebody offer some suggestions?
Why isn't $LOAD_PATH working for me, even though i see the path i need
in $LOAD_PATH?
Thanks,
Parv