Forum: Ruby How to tell Ruby the relative path of file

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
73700e119917433681f2e8f3e4369f74?d=identicon&s=25 Li CN (alex-osu3)
on 2008-01-08 21:00
Hi all,

I use window vista version. I want to open a file using relative path.I
wonder it is possible and how.

Thank you very much,

Li
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2009-09-03 19:10
> I use window vista version. I want to open a file using relative path.I
> wonder it is possible and how.

Check out the "require_all" gem which has a require_rel method.

or "require_relative" from backports/1.9:
http://github.com/marcandre/backports/tree/master

Also note that if you want to calculate a relative path between two
files, use Pathname#relative_path_from

GL.
-r
This topic is locked and can not be replied to.