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

Jordan Anderson
Jordan Anderson
19,560 Points

Ruby basics - running a program in your terminal

Hello all!

I am working on the ruby basics course. I was following along with the video using my own terminal. However, when I created a file like hello.rb with TextMate and tried to run in it my terminal i got:

Jordans-MacBook-Pro:~ JNA$ ruby hello.rb ruby: No such file or directory -- hello.rb (LoadError)

Why can it not see the file sitting on my desktop? Do I need to place the file in a specific directory/location?

2 Answers

Michael Wiss
Michael Wiss
19,233 Points

did you try "cd desktop"?

Jordan Anderson
Jordan Anderson
19,560 Points

Michael you're a genius! No idea why I didn't think of that...