ruby on rails - Heroku rake migration



当我尝试在heroku上运行rake命令时,会发生此错误。我使用的是Rails 3.0.7

**D:Productagent360>** heroku rake --trace db:migrate VERSION=20110513084747
rake aborted!
undefined method `task' for #<Final::Application:0x7fc0f63088b0>
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/application.rb:215:in `initialize_tasks'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/application.rb:139:in `load_tasks'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in `send'
/app/.bundle/gems/ruby/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in `method_missing'
/app/Rakefile:7
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.0/lib/rake/rake_module.rb:25:in `load'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.0/lib/rake/rake_module.rb:25:in `load_rakefile'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.0/lib/rake/application.rb:495:in `raw_load_rakefile'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.0/lib/rake/application.rb:78:in `load_rakefile'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.0/lib/rake/application.rb:129:in `standard_exception_handli
ng'

这是rake 0.9.0最近发布的一个错误。有几个变通办法,但我建议你现在降级到0.8.7。

在您的Gemfile中添加

gem 'rake', '~> 0.8.7'

然后运行

$ bundle update rake

并提交。

相关内容

  • 没有找到相关文章

最新更新