# Rake aborted! -- Help

**URL:** <https://www.ruby-forum.com/t/rake-aborted-help/101827>\
**Category:** Ruby\
**Created:** [August 8, 2006, 7:37am UTC](https://www.ruby-forum.com/t/rake-aborted-help/101827 "2006-08-08T07:37:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kublai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a3d4f5/32.png) [@kublai](https://www.ruby-forum.com/u/kublai)\
**Post date:** [August 8, 2006, 7:37am UTC](https://www.ruby-forum.com/t/rake-aborted-help/101827/1 "2006-08-08T07:37:57Z")

</div>

Hi,  
I posted this problem on the rails forum, but got no reply. Hoping  
someone here may be able to lead me to a resolution.

When I run

> rake db:migrate

Rake aborts with the following message:

rake aborted!  
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,  
Rakefile.rb)  
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1822:in  
`load\_rakefile’  
(See full trace by running task with --trace)

rakefile exists in:

C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/

Putting copies of Rakefile and rakefile.rb in the directory where  
rake.rb is doesn’t help.

Help would be appreciated.  
Thanks,  
gk

---

<div class="post-metadata">

**Author:** ![kublai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a3d4f5/32.png) [@kublai](https://www.ruby-forum.com/u/kublai)\
**Post date:** [August 8, 2006, 3:38pm UTC](https://www.ruby-forum.com/t/rake-aborted-help/101827/2 "2006-08-08T15:38:53Z")

</div>

On 8/8/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> When I run
> 
> > rake db:migrate
> 
> Rake aborts with the following message:
> 
> rake aborted!  
> No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,  
> Rakefile.rb)

the error says it all. It can’t find a file named rake, Rakefile, or  
rakefile.rb in the directory you’re in.

for more details follow the instructions in the rest of the error  
message

---

<div class="post-metadata">

**Author:** ![kublai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a3d4f5/32.png) [@kublai](https://www.ruby-forum.com/u/kublai)\
**Post date:** [August 8, 2006, 4:20pm UTC](https://www.ruby-forum.com/t/rake-aborted-help/101827/3 "2006-08-08T16:20:59Z")

</div>

On 8/8/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Putting copies of Rakefile and rakefile.rb in the directory where  
> rake.rb is doesn’t help.

The rakefile should be in the directory you are executing the command  
from. Rake looks there first, and if it finds nothing, it looks on the  
parents of that directory.

I think it’s better to put the rakefile in the root directory of your  
project, and to execute rake from there (similar to what I’d do with  
an Ant file).

---

<div class="post-metadata">

**Author:** ![kublai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a3d4f5/32.png) [@kublai](https://www.ruby-forum.com/u/kublai)\
**Post date:** [August 8, 2006, 10:21pm UTC](https://www.ruby-forum.com/t/rake-aborted-help/101827/4 "2006-08-08T22:21:36Z")

</div>

Bira,

Great advice! I checked all downloaded Rails apps and, indeed, rakefile  
is in the application root directory. It must be that when Rails  
creates an application, it copies rakefile into the application root.  
For some reason, I lost the rakefile in my Rails application directory.  
I put it back there, and, lo and behold … it works!

Thanks for the help.  
gk
