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.