Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

beginning ruby...

Hi,

Quick question. I opened up textmate and saved a file to my desktop, called hello.rb. I typed in puts "hello world" and saved it.

Next, I opened up my terminal, made sure it was not in irb mode, and typed in ruby hello.rb. The terminal than said there was not such a file or directory.

Any ideas of why this happened and how to fix it?

Thanks, Kristina

Did you type in "cd desktop" first?

Well, no because I have a mac.

1 Answer

Kristina, you have to change directories when you first open Terminal if you saved your file on the desktop -- so in this case, like Leandra said type "cd Desktop" and then "ruby hello.rb"

Oh! Got it. Thanks.

Kristina