# Specifying path

**URL:** <https://rubytalk.org/t/specifying-path/41996>\
**Category:** ruby-talk\
**Created:** [7 November 2007 21:02 UTC](https://rubytalk.org/t/specifying-path/41996 "2007-11-07T21:02:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joey\_eisma](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@joey\_eisma](https://rubytalk.org/u/joey_eisma)\
**Post date:** [7 November 2007 21:02 UTC](https://rubytalk.org/t/specifying-path/41996/1 "2007-11-07T21:02:47Z")

</div>

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](http://mail.yahoo.com)

---

<div class="post-metadata">

**Author:** ![Jan\_Svitok](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@Jan\_Svitok](https://rubytalk.org/u/Jan_Svitok)\
**Post date:** [7 November 2007 21:21 UTC](https://rubytalk.org/t/specifying-path/41996/2 "2007-11-07T21:21:23Z")

</div>

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.

> **···**
>
> On 11/7/07, joey eisma \<joey\_eisma@yahoo.com\> wrote:
> 
> > on windows..i was trying to do a require("path to .rb"). how do you say "c:\my ruby stuff\myprogram.rb"?
