Ruby on Rails
Thursday, March 28, 2013
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@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment