类User的超类不匹配(TypeError)? [英] Superclass mismatch for class User (TypeError)?
本文介绍了类User的超类不匹配(TypeError)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
/ app / app / models / user.rb:1:在< top(required)>'中:类User的超类不匹配(TypeError)
/app/app/models/user.rb:1 :在< top(required)>'中:类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:在'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:在'require'
2013-11-28T03:39:50.220378 + 00:00 app [ web.1]:从
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-
3.2.11 / lib / active_support / dependencies.rb:359:在`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:在`load_dependency'
2013-11-28T03:39:50.220378 + 00:00 app [web .1]:从
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-
3.2.11 / lib / active_support / dependencies.rb:313:在'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:在`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:在`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.2 20557 + 00:00 app [web.1]:from
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:54:in`每个'
2013-11-28T03:39:50.220557 + 00:00应用[web.1]:从
/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:在`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
`初始化!'
2013-11-28T03:39:50.220696 + 00:00 app [web.1]:from /app/config/environment.rb:5:in
`< top(必填项)>'
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]:从/app/config.ru:3:in'require'
2013-11-28T03:39:50.220557 + 00:00 app [ web.1]:从
/ app /vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:55: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:在`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:在`wrapped_app'
2013-11-28T03:39:50.221093 + 00:00 app [web.1]:从
/ app / vendor / bundle / ruby / 2.0.0 / gems / rack-1.4.5 / lib / rack / server.rb:200:`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 :在'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:在`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:在
的块中(顶部(必填)>'
2013-11-28T03:39:50.221093 + 00:00应用[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]:从script / rails:6:在'require'
2013-11-28T03:39:50.221093 + 00:00 app [web.1]:从脚本/导轨:6:在< main>
2013-11-28T03:39:51.352167 + 00:00 heroku [web.1]:进程退出状态1
2013-11-28T03:39:51.375056 + 00:00 heroku [web.1]:状态从开始变为崩溃
我无法理解为什么我得到这个错误,因为我没有/models/user.rb/。是。我已经做了一次,并已将其删除。
您可以给我一些建议吗?
解决方案看看
/app/app/models/user.rb
app / app?这是关闭的。调查你的项目源,你确实有一个user.rb文件
I have trouble with Heroku. I did heroku logs
and got a error message:
/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
I can't understand why I got this error because I have no /models/user.rb/. Yes. I actually made it once and removed it already.
Could you give me some advice?
解决方案
Look at
/app/app/models/user.rb
app/app? This is off. investigate your project source, you do indeed have a user.rb file
这篇关于类User的超类不匹配(TypeError)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文