0

简而言之:我的应用程序在使用 Devise 的开发中运行良好,但是在生产中我收到如下所示的错误。请记住,我正在使用 KatanaCode 的 BlogIt 引擎,但我已经重新构建了用户模型和模式,并且它只使用了 Devise 的模型。

github:https ://github.com/Apane/Blogit_blog

请指教。

   2013-05-29T03:21:40.998554+00:00 heroku[web.1]: Process exited with status 1
2013-05-29T03:21:41.015407+00:00 heroku[web.1]: State changed from starting to crashed
2013-05-29T03:21:43.320094+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=infinite-springs-1056.herokuapp.com fwd="99.233.170.104" dyno= connect= service= status=503 bytes=
2013-05-29T03:30:35.867092+00:00 heroku[slugc]: Slug compilation started
2013-05-29T03:31:18.246368+00:00 heroku[api]: Deploy 40e00ad by "email"
2013-05-29T03:31:18.259954+00:00 heroku[api]: Release v32 created by "email"
2013-05-29T03:31:18.303244+00:00 heroku[api]: Deploy 40e00ad by "email"
2013-05-29T03:31:18.793210+00:00 heroku[slugc]: Slug compilation finished
2013-05-29T03:31:18.954842+00:00 heroku[web.1]: State changed from crashed to starting
2013-05-29T03:31:21.260593+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 17013`
2013-05-29T03:31:26.046042+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-05-29T03:31:26.046145+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-05-29T03:31:26.046393+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-05-29T03:31:27.383898+00:00 app[web.1]: [Blogit]: Blogit::Configuration#rss_feed_language has been deprecated. You can remove this from your blogit.rb configuration file
2013-05-29T03:31:28.147889+00:00 app[web.1]: Exiting
2013-05-29T03:31:28.147889+00:00 app[web.1]: => Booting WEBrick
2013-05-29T03:31:28.147889+00:00 app[web.1]: => Rails 3.2.13 application starting in production on http://0.0.0.0:17013
2013-05-29T03:31:28.147889+00:00 app[web.1]: => Call with -d to detach
2013-05-29T03:31:28.147889+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-05-29T03:31:28.192463+00:00 app[web.1]:    from /app/app/models/user.rb:1:in `<top (required)>'
2013-05-29T03:31:28.192463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-05-29T03:31:28.192463+00:00 app[web.1]:    from /app/app/models/user.rb:4:in `<class:User>'
2013-05-29T03:31:28.192463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:502:in `load_missing_constant'
2013-05-29T03:31:28.192840+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `const_missing'
2013-05-29T03:31:28.192463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-05-29T03:31:28.193094+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.4/lib/devise.rb:306:in `add_mapping'
2013-05-29T03:31:28.192840+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:588:in `constantize'
2013-05-29T03:31:28.192840+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.4/lib/devise.rb:272:in `get'
2013-05-29T03:31:28.192463+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/dynamic_matchers.rb:55:in `method_missing': undefined method `devise' for User(id: integer, created_at: datetime, updated_at: datetime):Class (NoMethodError)
2013-05-29T03:31:28.192463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-05-29T03:31:28.192463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-05-29T03:31:28.192840+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:554:in `get'
2013-05-29T03:31:28.193094+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.4/lib/devise/mapping.rb:66:in `initialize'
2013-05-29T03:31:28.192840+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `each'
2013-05-29T03:31:28.192840+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:229:in `each'
2013-05-29T03:31:28.192840+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:229:in `constantize'
2013-05-29T03:31:28.193316+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:267:in `draw'
2013-05-29T03:31:28.193094+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.4/lib/devise/rails/routes.
rb:207:in `devise_for'
2013-05-29T03:31:28.193316+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
2013-05-29T03:31:28.193316+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
2013-05-29T03:31:28.193548+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:34:in `call'
2013-05-29T03:31:28.193762+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-05-29T03:31:28.193548+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:16:in `reload!'
2013-05-29T03:31:28.193548+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:108:in `reload_routes!'
2013-05-29T03:31:28.193548+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
2013-05-29T03:31:28.192463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-05-29T03:31:28.192840+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.4/lib/devise/mapping.rb:77:in `to'
2013-05-29T03:31:28.192463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:192:in `block in const_missing'
2013-05-29T03:31:28.193973+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-05-29T03:31:28.193762+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-05-29T03:31:28.193094+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.4/lib/devise/rails/routes.rb:208:in `block in devise_for'
2013-05-29T03:31:28.193762+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-05-29T03:31:28.193094+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.4/lib/devise.rb:306:in `new'
2013-05-29T03:31:28.193094+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.4/lib/devise/mapping.rb:156:in `default_used_route'
2013-05-29T03:31:28.193548+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
2013-05-29T03:31:28.193973+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
2013-05-29T03:31:28.193973+00:00 app[web.1]:    from /app/config.ru:in `new'
2013-05-29T03:31:28.193973+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-05-29T03:31:28.193762+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-05-29T03:31:28.194186+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
2013-05-29T03:31:28.194186+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-05-29T03:31:28.194186+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-05-29T03:31:28.194186+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-05-29T03:31:28.194186+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
2013-05-29T03:31:28.194186+00:00 app[web.1]:    from script/rails:6:in `require'
2013-05-29T03:31:28.194186+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
2013-05-29T03:31:28.192840+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:230:in `block in constantize'
2013-05-29T03:31:28.192840+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.4/lib/devise/mapping.rb:72:in `modules'
2013-05-29T03:31:28.193316+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:289:in `eval_block'
2013-05-29T03:31:28.193094+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.4/lib/devise/mapping.rb:89:in `routes'
2013-05-29T03:31:28.193094+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:289:in `instance_exec'
2013-05-29T03:31:28.193094+00:00 app[web.1]:    from /app/config/routes.rb:4:in `block in <top (required)>'
2013-05-29T03:31:28.193316+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `block in load'
2013-05-29T03:31:28.193316+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:40:in `each'
2013-05-29T03:31:28.193094+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.4/lib/devise/rails/routes.rb:207:in `each'
2013-05-29T03:31:28.193316+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:40:in `load_paths'
2013-05-29T03:31:28.193316+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
2013-05-29T03:31:28.193316+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-05-29T03:31:28.193548+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `each'
2013-05-29T03:31:28.193548+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.4/lib/devise/rails.rb:14:in `block in <class:Engine>'
2013-05-29T03:31:28.193316+00:00 app[web.1]:    from /app/config/routes.rb:1:in `<top (required)>'
2013-05-29T03:31:28.193762+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-05-29T03:31:28.193548+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/finisher.rb:52:in `block in <module:Finisher>'
2013-05-29T03:31:28.193548+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
2013-05-29T03:31:28.193973+00:00 app[web.1]:    from /app/config.ru:3:in `block in <main>'
2013-05-29T03:31:28.193762+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-05-29T03:31:28.193762+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-05-29T03:31:28.193548+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-05-29T03:31:28.193973+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-05-29T03:31:28.193762+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2013-05-29T03:31:28.193762+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-05-29T03:31:28.193973+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2013-05-29T03:31:28.194186+00:00 app[web.1]:    from script/rails:6:in `<main>'
2013-05-29T03:31:28.193762+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-05-29T03:31:28.193973+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-05-29T03:31:28.193973+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-05-29T03:31:28.193973+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-05-29T03:31:29.377624+00:00 heroku[web.1]: Process exited with status 1
2013-05-29T03:31:29.396876+00:00 heroku[web.1]: State changed from starting to crashed
2013-05-29T03:31:29.397413+00:00 heroku[web.1]: State changed from crashed to starting
2013-05-29T03:31:32.474515+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 20203`
4

1 回答 1

0

尝试gem 'activerecord'从您的 bash 中删除Gemfile,然后rails generate devise:install在您的 bash 中运行。

于 2013-08-29T10:04:19.573 回答