geeting full path name of a file

Hello all,

how can i get the full path name of a i have file called
"example.csv". in "D " drive .

when i am using IE with rails i am geeting the full path name .but
when i am using it with firefox i am just getting the filename. is
there any way i could get the full path name


What method are you currently using?

Hi Matt,

I am not using any method for getting the path.As i select the file
name in IE its prinitng the full path of the file as file name in IE
where as in fire fox ,its not printing the fullpath when i am using
the file name that i used in there any method in ruby which
i can use in for getting the full path of the file


Is File.expand_path(filename) what you're looking for?

Jagan did you ever manage to work this out? I need to do the same thing


Don't want to revive a 5 year old thread. But for those who came here
looking for answers, this is how I got it:

require 'pathname'
filepath = some_valid_path

The thing to note is that realpath expects the file to exist.