heroku PostgreSQL数据库迁移错误

时间:2013-02-08 20:39:23

标签: ruby-on-rails postgresql heroku

当我尝试在heroku中迁移postgres数据库时,我收到错误。 首先我得到了:

$ heroku run rake db:migrate --trace
rake aborted!
undefined method `find_by_name' for Gem::Specification:Class
/app/lib/tasks/auto_annotate_models.rake:22:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/depen                                        dencies.rb:245:in `load'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/depen                                        dencies.rb:245:in `block in load'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/depen                                        dencies.rb:236:in `load_dependency'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/depen                                        dencies.rb:245:in `load'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/engine.rb:425:in `b                                        lock in load_tasks'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/engine.rb:425:in `e                                        ach'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/engine.rb:425:in `l                                        oad_tasks'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/application.rb:145:                                        in `load_tasks'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/railtie/configurabl                                        e.rb:30:in `method_missing'
/app/Rakefile:7:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `lo                                        ad'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `lo                                        ad_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:583:in `r                                        aw_load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:89:in `bl                                        ock in load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `s                                        tandard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:88:in `lo                                        ad_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:72:in `bl                                        ock in run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `s                                        tandard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:70:in `ru                                        n'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/bin/rake:19:in `load'
/app/vendor/bundle/ruby/1.9.1/bin/rake:19:in `<main>'

发生了什么事?

1 个答案:

答案 0 :(得分:1)

在迁移之前你做过heroku run rake db:create吗?