W
walter
I looked in the faq and I couldn't find my answer or a searchable
archive for the mailing list (so if anyone has that it would be
great).
I have a 1st.rb file that loads an xml configuration file that is in
the same directory. I have 2nd.rb file that uses the 1st.rb file via
require. Everything was fine when they were in the same directory,
but when I put 1st.rb in a subdirectory, it no longer loads its .xml
file (which has also moved to the subdirectory). I get a "No such
file or directory" error.
So the question is, how does one load a resource relative to the
actual file, and not the file that required it?
Walt
*****************************************************
Walter Szewelanczyk
IS Director
M.W. Sewall & CO. email : (e-mail address removed)
259 Front St. Phone : (207) 442-7994 x 128
Bath, ME 04530 Fax : (207) 443-6284
*****************************************************
archive for the mailing list (so if anyone has that it would be
great).
I have a 1st.rb file that loads an xml configuration file that is in
the same directory. I have 2nd.rb file that uses the 1st.rb file via
require. Everything was fine when they were in the same directory,
but when I put 1st.rb in a subdirectory, it no longer loads its .xml
file (which has also moved to the subdirectory). I get a "No such
file or directory" error.
So the question is, how does one load a resource relative to the
actual file, and not the file that required it?
Walt
*****************************************************
Walter Szewelanczyk
IS Director
M.W. Sewall & CO. email : (e-mail address removed)
259 Front St. Phone : (207) 442-7994 x 128
Bath, ME 04530 Fax : (207) 443-6284
*****************************************************