1

So after pushing my app to heroku, I tried to migrate database to heroku. However, I get the following error.

C:\Users\Administrator\Ruby\Myapp>heroku rake db:migrate
rake aborted!
undefined method `task' for #<MyApp::Application:0x7fc922c28dd0>

In local, everything works just fine including migration.

Also, migration worked just fine about few days ago, therefore it seems the error is after the rake version which changed from 0.8.7 to 0.9.0 in Heroku.

How can I resolve this problem?

user482594
  • 16,878
  • 21
  • 72
  • 108

2 Answers2

2

had this problem yesterday and posted here: Rake 0.9.0 'undefined method 'task' ' Several solutions have been specified.

Community
  • 1
  • 1
cmwright
  • 3,406
  • 5
  • 26
  • 33
2

Try adding

gem 'rake', '0.8.7'

to your Gemfile, to control the version of Rake that Heroku uses on your app.

Graham Savage
  • 1,129
  • 13
  • 20