-5

While looking at this issue, I see that the solution offered doesn't follow a chain of symlinks/regular links.

How can I do that with Ruby?

Community
  • 1
  • 1
user1134991
  • 3,003
  • 2
  • 25
  • 35

1 Answers1

2

You could try:

require 'pathname'
Pathname.new("/path/to/symlink").realpath.to_s
Pedram
  • 224
  • 1
  • 3
  • 12