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

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
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.