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!

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


loading Ruby file to IRB

Hello treehouse community,

I am currently working on the Ruby Foundations series and having trouble loading the work I do on Sublime Text 2 to load onto irb (more specifically the class methods bank account video).

the video simply types '''ruby load './bank_account.rb' ''' when I try to use the load command a load error comes up. I feel like the my issue is the placement of my files. any help would be much appreciated thank you!!

2 Answers

James Barnett
James Barnett
39,199 Points

You have to use the correct relative path when referencing a file from the command line. Absolute and relative paths work the same way on the command line work the same way as they do in HTML/CSS.

Here's an example:

file directory structure example

Does that help?

If not, you can read up about absolute vs relative paths

awesome thank you!!!