# Specifying path

**URL:** <https://www.ruby-forum.com/t/specifying-path/119552>\
**Category:** Ruby\
**Created:** [November 7, 2007, 10:07pm UTC](https://www.ruby-forum.com/t/specifying-path/119552 "2007-11-07T22:07:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joey\_eisma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a183cd/32.png) [@joey\_eisma](https://www.ruby-forum.com/u/joey_eisma)\
**Post date:** [November 7, 2007, 10:07pm UTC](https://www.ruby-forum.com/t/specifying-path/119552/1 "2007-11-07T22:07:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![joey\_eisma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a183cd/32.png) [@joey\_eisma](https://www.ruby-forum.com/u/joey_eisma)\
**Post date:** [November 7, 2007, 10:24pm UTC](https://www.ruby-forum.com/t/specifying-path/119552/2 "2007-11-07T22:24:09Z")

</div>

On 11/7/07, joey eisma [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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.
