Rake aborted

Hey,

im having some trouble when trying to run this command:
heroku rake db:migrate,

the error message: rake aborted!
undefined method ‘task’ for #Myapp::Application:0x7f07c011f4f8

I googled it and did whatever I could find people recommended and it
still doesn’t work. I ran:
gem uninstall rake -v 0.9.0
gem install rake -v 0.8.7

added: gem ‘rake’, ‘~> 0.8.7’ to my gemfile and ran bundle install

added: class Application
include Rake::DSL
end
end
module ::RakeFileUtils
extend Rake::FileUtilsExt
end

to my rakefile.

when i trace, these files come up:
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/application.rb
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.0/lib/rake/rake_module.rb
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.0/lib/rake/application.rb

So, im guessin the rake-0.9.0 file that comes up is the culprit, but i
dunno how to delete it.

Thanks in advance