specifying path

J

joey eisma

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

on windows..i was trying to do a require("path to .rb"). how do you say "c:\my ruby stuff\myprogram.rb"?

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 
J

Jano Svitok

on windows..i was trying to do a require("path to .rb"). how do you say "c:\my ruby stuff\myprogram.rb"?

Use forward slashes (/), or double backslashes (\\). Backslash is
escape char (used for \n newline, \t tab char, etc. So to obtain the
backslash itself you have to write it twice.

Note: generally it's best to avoid spaces in paths, but it should work
with them as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

:: and . 6
how to run SciTE from any path 1
Magazine name 1
Simple Q: bit string -> integer 2
daemons 0
What is the meaning of Dim 6
Using a result as a constant object? 6
Hpricot Relative Path 2

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top