ruby on rails - heroku run rake db:migrate ... rake aborted! No Rakefile found -
when run heroku run rake db:migrate
, receive next error:
$ heroku run rake db:migrate running `rake db:migrate` attached 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 have posted identical errors, in case didn't have rakefile , worked them 1 time created one, or in wrong directory. app have rakefile, in right directory , proper text in it, , in app's root directory.
this rakefile looks like:
# add together own tasks in files placed in lib/tasks ending in .rake, # illustration lib/tasks/capistrano.rake, , automatically available rake. require file.expand_path('../config/application', __file__) rails.application.load_tasks
this "heroku run cat rakefile" does:
$ heroku run cat rakefile running `cat rakefile` attached terminal... up, run.9132 cat: rakefile: no such file or directory
whenever struggling heroku should check logs: heroku logs
scan through errors can google and/or hints going wrong.
if using git can search errors this:git grep "whatever want search for"
you know find file might seek verify rakefile exists with: git grep rakefile
sometimes easier start fresh , reset database , reload current schema with: rake db:reset db:migrate
this destroy db , create , migrate current schema: rake db:drop db:create db:migrate
if want reset heroku db to drop database, if using shared_database_url: heroku pg:reset database
to recreate database nil in it: heroku run rake db:migrate
to populate database seed data: heroku run rake db:seed
ruby-on-rails heroku rake abort rakefile
No comments:
Post a Comment