From: tamouse mailing lists Date: 2013-05-01T02:39:58+09:00 Subject: Re: Rspec/rake note working On Tue, Apr 30, 2013 at 2:15 AM, Tom Galpin wrote: > Working on a tutorial and starting to use TDD/rspec. > > For some reason I cannot get it to work. Been working trying to fix > this over two days now. > > The tutorial has given me a Rakefile that should work. I also have a > spec file and I am creating a file to pass the tests. > > I am supposed to run 'rake' in my console to have it return the passing > or failing tests, but each time (no matter how much I move things > around) I get the following message (as if the 'hello.rb' file doesn't > exist): > > in /Users/******/Desktop/********/learn_ruby) > /Users/*******/Desktop/******/learn_ruby/00_hello/hello_spec.rb:116:in > `require': cannot load such file -- hello (LoadError) You are probably not setting up the load path correctly for it to be able to find hello.rb. If it's in the same directory as hello_spec.rb, you should be able to just give: require './hello' in hello_spec.rb; the './' says to use the current directory as the current file. If this isn't the case, more work will be required. And let me say: Good for you! :)