Rake db:migrate doesn't work anymore


#1

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!


#2

Kai wrote:

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


#3

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’


#4

On Jan 11, 8:55 pm, Kai 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.