# Rake db:migrate doesn't work anymore

**URL:** <https://www.ruby-forum.com/t/rake-db-migrate-doesnt-work-anymore/81710>\
**Category:** Rails\
**Created:** [January 11, 2007, 7:55pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-doesnt-work-anymore/81710 "2007-01-11T19:55:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/cc9497/32.png) [@Kai](https://www.ruby-forum.com/u/Kai)\
**Post date:** [January 11, 2007, 7:55pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-doesnt-work-anymore/81710/1 "2007-01-11T19:55:39Z")

</div>

Hi!  
Up to now, i had no problems with my migrations and rake (rake  
db:migrate). Today, i got a project from a svn repository, but i can’t  
do “rake db:migrate”:  
“rake aborted!  
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,  
Rakefile.rb)  
/opt/local/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)”  
I am in the right directory - what can be wrong?  
Thanks!

---

<div class="post-metadata">

**Author:** ![Kai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/cc9497/32.png) [@Kai](https://www.ruby-forum.com/u/Kai)\
**Post date:** [January 12, 2007, 11:14am UTC](https://www.ruby-forum.com/t/rake-db-migrate-doesnt-work-anymore/81710/2 "2007-01-12T11:14:44Z")

</div>

Kai wrote:

> (See full trace by running task with --trace)"

---

<div class="post-metadata">

**Author:** ![Kai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/cc9497/32.png) [@Kai](https://www.ruby-forum.com/u/Kai)\
**Post date:** [January 12, 2007, 11:40am UTC](https://www.ruby-forum.com/t/rake-db-migrate-doesnt-work-anymore/81710/3 "2007-01-12T11:40:25Z")

</div>

You should have a file called “Rakefile” in the current directory where  
you’re calling rake (ie. the root directory of you rails project). Make  
sure the file is present and accessible (ie. has correct permissions).  
It should contain something like this:

* * *

# Add your own tasks in files placed in lib/tasks ending in .rake,

# for example lib/tasks/switchtower.rake, and they will automatically be

available to Rake.

require(File.join(File.dirname( **FILE** ), ‘config’, ‘boot’))

require ‘rake’  
require ‘rake/testtask’  
require ‘rake/rdoctask’

require ‘tasks/rails’

---

<div class="post-metadata">

**Author:** ![Kai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/cc9497/32.png) [@Kai](https://www.ruby-forum.com/u/Kai)\
**Post date:** [January 19, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-doesnt-work-anymore/81710/4 "2007-01-19T16:31:48Z")

</div>

On Jan 11, 8:55 pm, Kai [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Up to now, i had no problems with my migrations and rake (rake  
> db:migrate). Today, i got a project from a svn repository, but i can’t  
> do “rake db:migrate”:  
> "rake aborted!  
> No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,  
> Rakefile.rb)

Not all projects use migrations, but it looks like nobody’s committed  
this project’s Rakefile in this case. It’s possible that the provider  
of the source code doesn’t see the file as essential, or has local mods  
in it or just plain forgot to commit it.

Either grab one from another project or chat to the provider of the  
source code.

Ciao,  
Sheldon.
