Why do I get "RAKEFILE ABORTED, NO RAKEFILE FOUND"?

user2650627 picture user2650627 · Aug 4, 2013 · Viewed 8.6k times · Source

I am attempting to take an interactive Ruby test to no avail.

I downloaded the zip file with no problems and followed the directions for the terminal command line where I continue to get the following error. I am using "Ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin10.8.0]".

If anyone can offer any help or suggestions thank you in advance.

INSTRUCTIONS:

Install RSpec

  gem install rspec

Enter the course directory. (That's the same directory that this
index.html file is in.)

  cd learn_ruby

Enter the 00_hello lab.

  cd 00_hello

Open a terminal in this directory

cd 00_hello

This directory is the starting point for this exercise. It contains a
spec file and you'll be adding a ruby file to (eventually) make the
specs pass.

Run the test

  rake

Watch it fail

You should see an error. Don't get scared! Try to read it and figure out
what the computer wants to tell you. Somewhere on the first line it
should say something like

no such file to load -- test-first-teaching/hello/hello (LoadError)

I do not get this error message, I get the one below:

rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,
Rakefile.rb)
/usr/local/rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in
`<main>'
(See full trace by running task with --trace)

When I run rake --trace I receive:

rake --trace
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,
Rakefile.rb)
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/rake-10.1.0/lib/rake/application.rb:632:in
`raw_load_rakefile'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/rake-10.1.0/lib/rake/application.rb:94:in
`block in load_rakefile'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/rake-10.1.0/lib/rake/application.rb:165:in
`standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/rake-10.1.0/lib/rake/application.rb:93:in
`load_rakefile'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/rake-10.1.0/lib/rake/application.rb:77:in
`block in run'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/rake-10.1.0/lib/rake/application.rb:165:in
`standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/rake-10.1.0/lib/rake/application.rb:75:in
`run'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/rake-10.1.0/bin/rake:33:in
`<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p392/bin/rake:19:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p392/bin/rake:19:in `<main>'
/usr/local/rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in
`<main>'

Answer

Connor Leech picture Connor Leech · Aug 12, 2013

you have to cd into your project directory before you can run rake routes