# Learn Ruby The Hard Way

**URL:** <https://metaruby.com/t/learn-ruby-the-hard-way/479>\
**Category:** Ruby Questions\
**Created:** [April 4, 2016, 11:27am UTC](https://metaruby.com/t/learn-ruby-the-hard-way/479 "2016-04-04T11:27:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![CaiGengYang](https://metaruby.com/letter_avatar_proxy/v4/letter/c/b782af/32.png) [@CaiGengYang](https://metaruby.com/u/CaiGengYang)\
**Post date:** [April 4, 2016, 11:27am UTC](https://metaruby.com/t/learn-ruby-the-hard-way/479/1 "2016-04-04T11:27:20Z")

</div>

Hello,

So I am a newbie programmer just starting to learn Ruby and am reading Michael Hartl’s book “Learn Ruby The Hard Way”.

In exercise 0 ([http://learnrubythehardway.org/book/ex0.html](http://learnrubythehardway.org/book/ex0.html)) , he describes the steps a person must take to get his computer to run Ruby, which includes learning how to make a directory in the Terminal, change into a directory in the Terminal and use the editor to create a file in the directory.

I could complete all the steps successfully except step 11 — (Use your editor to create a file in this directory. You will make the file, “Save” or “Save As…,” and pick this directory). — no idea how to do this.

Any help appreciated …

Gengyang

---

<div class="post-metadata">

**Author:** ![kofno](https://metaruby.com/user_avatar/metaruby.com/kofno/32/159_2.png) [@kofno](https://metaruby.com/u/kofno)\
**Post date:** [April 4, 2016, 12:30pm UTC](https://metaruby.com/t/learn-ruby-the-hard-way/479/2 "2016-04-04T12:30:19Z")

</div>

Which operating system are you using? Which text editor? Can you launch the text editor? Where are you stuck?

---

<div class="post-metadata">

**Author:** ![CaiGengYang](https://metaruby.com/letter_avatar_proxy/v4/letter/c/b782af/32.png) [@CaiGengYang](https://metaruby.com/u/CaiGengYang)\
**Post date:** [April 4, 2016, 12:47pm UTC](https://metaruby.com/t/learn-ruby-the-hard-way/479/3 "2016-04-04T12:47:57Z")

</div>

Operating System : OSX Yosemite Version 10.10.2  
Text Editor : TextWrangler.  
Can I Launch the text editor : Yes  
Where am I stuck : Step 11 of this tutorial page — [http://learnrubythehardway.org/book/ex0.html](http://learnrubythehardway.org/book/ex0.html) where it says to " Use your editor to create a file in this directory. You will make the file, “Save” or “Save As…,” and pick this directory. " — How do I do this ?

---

<div class="post-metadata">

**Author:** ![kofno](https://metaruby.com/user_avatar/metaruby.com/kofno/32/159_2.png) [@kofno](https://metaruby.com/u/kofno)\
**Post date:** [April 4, 2016, 1:09pm UTC](https://metaruby.com/t/learn-ruby-the-hard-way/479/4 "2016-04-04T13:09:41Z")

</div>

You’ll need to use the file menu. It should look like this:

 ![](https://metaruby.com/uploads/default/original/1X/52257191e4a0b13522a01a225db27fae8f58d1ec.png)

---

<div class="post-metadata">

**Author:** ![CaiGengYang](https://metaruby.com/letter_avatar_proxy/v4/letter/c/b782af/32.png) [@CaiGengYang](https://metaruby.com/u/CaiGengYang)\
**Post date:** [April 4, 2016, 1:30pm UTC](https://metaruby.com/t/learn-ruby-the-hard-way/479/5 "2016-04-04T13:30:34Z")

</div>

Ok , got the part about the file menu … but how do you “pick this directory” as per the instructions in the manual ?

I created a new “Hello World” text document and clicked the “Save As…” link , and under the “Where” tab , there were a bunch of folders like “Applications” , “Remote Disk” , “ICloud Drive”, “DropBox”, “Desktop” and “Downloads” … where lies the “directory” where I can save my new created file ?

---

<div class="post-metadata">

**Author:** ![kofno](https://metaruby.com/user_avatar/metaruby.com/kofno/32/159_2.png) [@kofno](https://metaruby.com/u/kofno)\
**Post date:** [April 4, 2016, 1:47pm UTC](https://metaruby.com/t/learn-ruby-the-hard-way/479/6 "2016-04-04T13:47:03Z")

</div>

That depends. When you made the directory in your Terminal, what did you name it?

---

<div class="post-metadata">

**Author:** ![CaiGengYang](https://metaruby.com/letter_avatar_proxy/v4/letter/c/b782af/32.png) [@CaiGengYang](https://metaruby.com/u/CaiGengYang)\
**Post date:** [April 4, 2016, 1:49pm UTC](https://metaruby.com/t/learn-ruby-the-hard-way/479/7 "2016-04-04T13:49:34Z")

</div>

I named it mystuff

CaiGengYangs-MacBook-Pro:~ CaiGengYang$ ruby -v  
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86\_64-darwin14]  
CaiGengYangs-MacBook-Pro:~ CaiGengYang$ mkdir mystuff  
mkdir: mystuff: File exists  
CaiGengYangs-MacBook-Pro:~ CaiGengYang$ cd mystuff  
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$  
[Restored]  
CaiGengYangs-MacBook-Pro:mystuff CaiGengYang$

---

<div class="post-metadata">

**Author:** ![kofno](https://metaruby.com/user_avatar/metaruby.com/kofno/32/159_2.png) [@kofno](https://metaruby.com/u/kofno)\
**Post date:** [April 4, 2016, 2:29pm UTC](https://metaruby.com/t/learn-ruby-the-hard-way/479/8 "2016-04-04T14:29:54Z")

</div>

![](https://metaruby.com/uploads/default/original/1X/c9c28981c7da0a5cdad87700c7bdbf4fffcb8fc5.png)

Click this button to expand the file dialog. Then hold Command-Shift-H. That will put you in your home directory. You should be to scroll through and find the directory you named `mystuff`.

---

<div class="post-metadata">

**Author:** ![CaiGengYang](https://metaruby.com/letter_avatar_proxy/v4/letter/c/b782af/32.png) [@CaiGengYang](https://metaruby.com/u/CaiGengYang)\
**Post date:** [April 4, 2016, 3:00pm UTC](https://metaruby.com/t/learn-ruby-the-hard-way/479/9 "2016-04-04T15:00:39Z")

</div>

K, Thanks alot kofno !

It finally works now … learned something today … Gonna take a break and then come back later to proceed on with exercise 1 and onwards.

Hmm … plan to make some nice web app with Ruby, put it on the internet … get users to test it, get feedback , then iterate the app accordingly …

Gengyang
