【发布时间】:2013-12-13 23:32:56
【问题描述】:
我在使用 Heroku 时遇到了麻烦。我做了heroku logs 并收到一条错误消息:
/app/app/models/user.rb:1:in `<top (required)>': superclass mismatch for class User (TypeError)
/app/app/models/user.rb:1:in `<top (required)>': superclass mismatch for class User (TypeError)
2013-11-28T03:39:50.220378+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-
3.2.11/lib/active_support/dependencies.rb:251:in `require'
2013-11-28T03:39:50.220378+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-
3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
2013-11-28T03:39:50.220378+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-
3.2.11/lib/active_support/dependencies.rb:251:in `require'
2013-11-28T03:39:50.220378+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-
3.2.11/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-11-28T03:39:50.220378+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-
3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-11-28T03:39:50.220378+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-
3.2.11/lib/active_support/dependencies.rb:313:in `depend_on'
2013-11-28T03:39:50.220378+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-
3.2.11/lib/active_support/dependencies.rb:225:in `require_dependency'
2013-11-28T03:39:50.220378+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/engine.rb:438:in `each'
2013-11-28T03:39:50.220557+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/engine.rb:436:in
`eager_load!'
2013-11-28T03:39:50.220557+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/engine.rb:438:in `block in
eager_load!'
2013-11-28T03:39:50.220378+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/engine.rb:439:in `block (2
levels) in eager_load!'
2013-11-28T03:39:50.220557+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/application/finisher.rb:53:in
`block in <module:Finisher>'
2013-11-28T03:39:50.220557+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:30:in
`instance_exec'
2013-11-28T03:39:50.220557+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `run'
2013-11-28T03:39:50.220557+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/engine.rb:436:in `each'
2013-11-28T03:39:50.220557+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `each'
2013-11-28T03:39:50.220557+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:54:in
`run_initializers'
2013-11-28T03:39:50.220696+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-11-28T03:39:50.220557+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/application.rb:136:in
`initialize!'
2013-11-28T03:39:50.220696+00:00 app[web.1]: from /app/config/environment.rb:5:in
`<top (required)>'
2013-11-28T03:39:50.220696+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-11-28T03:39:50.220696+00:00 app[web.1]: from /app/config.ru:3:in `require'
2013-11-28T03:39:50.220557+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:55:in `block
in run_initializers'
2013-11-28T03:39:50.220696+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in
`method_missing'
2013-11-28T03:39:50.220696+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-11-28T03:39:50.220696+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-11-28T03:39:50.220696+00:00 app[web.1]: from /app/config.ru:in `new'
2013-11-28T03:39:50.221093+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/commands/server.rb:70:in
`start'
2013-11-28T03:39:50.220696+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-11-28T03:39:50.221093+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-11-28T03:39:50.221093+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-11-28T03:39:50.220696+00:00 app[web.1]: from /app/config.ru:3:in `block in
<main>'
2013-11-28T03:39:50.221093+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/commands/server.rb:46:in `app'
2013-11-28T03:39:50.221093+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/commands.rb:50:in `tap'
2013-11-28T03:39:50.221093+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-11-28T03:39:50.221093+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/commands.rb:55:in `block in
<top (required)>'
2013-11-28T03:39:50.221093+00:00 app[web.1]: from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/commands.rb:50:in `<top
(required)>'
2013-11-28T03:39:50.221093+00:00 app[web.1]: from script/rails:6:in `require'
2013-11-28T03:39:50.221093+00:00 app[web.1]: from script/rails:6:in `<main>'
2013-11-28T03:39:51.352167+00:00 heroku[web.1]: Process exited with status 1
2013-11-28T03:39:51.375056+00:00 heroku[web.1]: State changed from starting to crashed
我不明白为什么会出现此错误,因为我没有 /models/user.rb/。是的。我实际上做了一次并删除了它。
你能给我一些建议吗?
【问题讨论】:
-
您是否承诺删除它并推动该更改?
标签: ruby-on-rails ruby ruby-on-rails-3 heroku