views:

1163

answers:

4

I'm trying to do a rake migrate, but I'm getting an error when I do this:

rake db:migrate

What I get back:

rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2377:in `raw_load_rakefile'
(See full trace by running task with --trace)

How do I fix this? Thanks.

+3  A: 

are you in the root directory of your project? is there a file called Rakefile?

tliff
A: 

Make sure the current directory is within your project.

So for example:

cd ~/projects/greatness/
rake:db migrate
Andy Gaskell
A: 

The error message seems rather self explanatory. There is no rakefile for rake to operate on.

If your rails structure is broken in some way, I'd suggest calling rails in a temporary folder then bringing across the script directory and rake file.

Scott Markwell
A: 

mkjvnjknsc dsjjdfnsjkkjcsklgs

ahsbdhjsbx