Hello all, how can i get the full path name of a file.like 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 thanks Jagan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
What method are you currently using? On Dec 6, 9:01 am, Jagan <jaganmohan.ja...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello all, > > how can i get the full path name of a file.like 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 > > thanks > Jagan--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 IE.is there any method in ruby which i can use in for getting the full path of the file Thanks Jagan On Dec 7, 2007 1:34 AM, Matt White <whiteqt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > What method are you currently using? > > > On Dec 6, 9:01 am, Jagan <jaganmohan.ja...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hello all, > > > > how can i get the full path name of a file.like 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 > > > > thanks > > Jagan > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Is File.expand_path(filename) what you''re looking for? On Dec 6, 1:13 pm, "Jagan Mohan Jasti" <jaganmohan.ja...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 IE.is there any method in ruby which > i can use in for getting the full path of the file > > Thanks > Jagan > > On Dec 7, 2007 1:34 AM, Matt White <whit...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > What method are you currently using? > > > On Dec 6, 9:01 am, Jagan <jaganmohan.ja...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello all, > > > > how can i get the full path name of a file.like 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 > > > > thanks > > > Jagan--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jagan did you ever manage to work this out? I need to do the same thing Thanks! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 Pathname.new(filepath).realpath.to_s The thing to note is that realpath expects the file to exist. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.