From: Robert Klemme Date: 2007-12-27T21:55:25+09:00 Subject: Re: File path 2007/12/26, Advait Bellur : > Hi, > > I needed to know how to find the path of a file at a particulat > place so that it should effect all the places where its called. > > I am hard coding it presently, is there a means of writing this > path some where and then calling it where ever needed > > file = File.open("/home/Ruby_Files/add.rb","r") The usual solution is to put the path into a variable or constant and use that instead of literals. Cheers robert -- use.inject do |as, often| as.you_can - without end