0

Have tried to run the rake db:migrate, returned an error.

Then ran it again with --trace, here is the error:

Paul-Denlingers-MacBook-Pro:things_i_bought pdenlinger$ rake db:migrate --trace

rake aborted! undefined method task' for #<ThingsIBought::Application:0x00000101679880> /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.7/lib/rails/application.rb:215:ininitialize_tasks' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.7/lib/rails/application.rb:139:in load_tasks' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.7/lib/rails/application.rb:77:inmethod_missing' /Users/pdenlinger/rails_projects/things_i_bought/Rakefile:7:in <top (required)>' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.0/lib/rake/rake_module.rb:25:inload' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.0/lib/rake/rake_module.rb:25:in load_rakefile' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.0/lib/rake/application.rb:495:inraw_load_rakefile' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.0/lib/rake/application.rb:78:in block in load_rakefile' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.0/lib/rake/application.rb:129:instandard_exception_handling' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.0/lib/rake/application.rb:77:in load_rakefile' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.0/lib/rake/application.rb:61:inblock in run' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.0/lib/rake/application.rb:129:in standard_exception_handling' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.0/lib/rake/application.rb:59:inrun' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.9.0/bin/rake:31:in <top (required)>' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/bin/rake:19:inload' /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0/bin/rake:19:in `'

It says that 'task' is an undefined method; what does this mean? And what can I do to fix it?

Running Rails 3.0.7

pdenlinger
  • 3,897
  • 10
  • 60
  • 92
  • possible duplicate of [Why can't i get rake db:migrate to work for ruby.railstutorial.org](http://stackoverflow.com/questions/6091617/why-cant-i-get-rake-dbmigrate-to-work-for-ruby-railstutorial-org) – Ryan Bigg May 29 '11 at 04:27
  • Thank you. My time on SO has been sporadic, and I'm not familiar with all the rules, but will try to understand them. – pdenlinger May 29 '11 at 05:04

3 Answers3

1

Take a look at this question. You can either revert to rake 0.8.7 in your Gemfile or patch your Rakefile.

Community
  • 1
  • 1
Jack Chu
  • 6,791
  • 4
  • 38
  • 44
0

Maybe this will help. ->Gist : broken rakefile

Xhinking
  • 1,069
  • 1
  • 11
  • 15
-1

Rake 0.9.0 broke a few things.

In the meantime, try:

bundle exec rake db:migrate
Felix
  • 801
  • 5
  • 9