From: Shekar Ls Date: 2009-08-19T14:02:21+09:00 Subject: Relative Path in ruby - for File open 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. Cheers -- Posted via http://www.ruby-forum.com/.