When I run heroku run rake db:migrate, I get the following error:
$ heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.8507
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/usr/local/lib/ruby/1.9.1/rake.rb:2367:in `raw_load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/local/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/local/bin/rake:31:in `<main>'
Other users posted the same errors, but in their case they did not actually have a Rakefile, and they worked for them after they were created, or they were in the wrong directory. My application has a Rakefile, in the correct directory and with all the relevant text in it, and I'm in the root directory of the application.
This is what my Rakefile looks like:
require File.expand_path('../config/application', __FILE__)
Rails.application.load_tasks
This is what the "heroku run cat rakefile" does:
$ heroku run cat Rakefile
Running `cat Rakefile` attached to terminal... up, run.9132
cat: Rakefile: No such file or directory
source
share