heroku run rake db:migrate - rake aborted - TypeError:类MultiBox的超类不匹配

时间:2014-08-15 13:09:02

标签: ruby-on-rails ruby heroku

运行heroku后运行rake db:migrate我得到:

Running `rake db:migrate --trace` attached to terminal... up, run.7762
rake aborted!
TypeError: superclass mismatch for class MultiBox
/app/vendor/bundle/ruby/1.9.1/gems/prawn-layout-0.8.4/lib/prawn/layout/grid.rb:191:in `<class:Document>'
/app/vendor/bundle/ruby/1.9.1/gems/prawn-layout-0.8.4/lib/prawn/layout/grid.rb:2:in `<module:Prawn>'
/app/vendor/bundle/ruby/1.9.1/gems/prawn-layout-0.8.4/lib/prawn/layout/grid.rb:1:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
/app/vendor/bundle/ruby/1.9.1/gems/prawn-layout-0.8.4/lib/prawn/layout.rb:3:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.rb:85:in `require'
/app/vendor/bundle/ruby/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.rb:85:in `rescue in block in require'
/app/vendor/bundle/ruby/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.rb:68:in `block in require'
/app/vendor/bundle/ruby/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.rb:61:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.rb:61:in `require'
/app/vendor/bundle/ruby/1.9.1/gems/bundler-1.6.3/lib/bundler.rb:132:in `require'
/app/config/application.rb:8:in `<top (required)>'
/app/Rakefile:4:in `require'
/app/Rakefile:4:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:687:in `raw_load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:94:in `block in load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:93:in `load_rakefile'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:77:in `block in run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/bin/rake:23:in `load'
/app/vendor/bundle/ruby/1.9.1/bin/rake:23:in `<main>'

3 个答案:

答案 0 :(得分:1)

我只是使用相同的错误消息解决问题。

就我而言,我正在使用之前在模型中定义的类名执行迁移。

也许你的MultiBox类是在某个地方定义的。

答案 1 :(得分:0)

我遇到了类MultiBox&#39;的超类不匹配问题。来自大虾的每个捆绑exec我做了之后我显然拙劣的巨大的git合并。这非常令人困惑,因为我没有在我的应用程序中使用MultiBox。当我重新合并时,错误消失了。

答案 2 :(得分:0)

使用prawn-table而不是prawn-layout。