On Aug 18, 2009, at 22:02 , Shekar Ls wrote: > Hi Guys, > I am trying to fetch a file to do some processing in ruby, > instead of giving the absolute path i wanted to give relative path. > > File.open("config.txt") do |source| > source.each_line do |line| > if line =~ /^(\w+)\s*=\s*"(.*)"\s*$/ > .... > > In the above mentioned example, i want config.txt to be accessed from > the current path whichever user runs it. what's the problem?