在heroku上成功部署后Rails应用程序无法正常工作?
Posted
技术标签:
【中文标题】在heroku上成功部署后Rails应用程序无法正常工作?【英文标题】:Rails app not working after successfull deploy on heroku? 【发布时间】:2021-12-21 04:45:04 【问题描述】:我制作了 rails 应用程序,它在本地运行良好,但在 heroku 上运行不正常 error_pic
然后我检查了下面的heroku日志
2021-11-08T09:42:16.413606+00:00 app[web.1]: pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
2021-11-08T09:42:16.413606+00:00 app[web.1]: (SELECT c.collname FROM pg_collation c, pg_type t
2021-11-08T09:42:16.413607+00:00 app[web.1]: WHERE c.oid = a.attcollation AND t.oid = a.atttypid AND a.attcollation <> t.typcollation),
2021-11-08T09:42:16.413607+00:00 app[web.1]: col_description(a.attrelid, a.attnum) AS comment
2021-11-08T09:42:16.413607+00:00 app[web.1]: FROM pg_attribute a LEFT JOIN pg_attrdef d
2021-11-08T09:42:16.413607+00:00 app[web.1]: ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2021-11-08T09:42:16.413608+00:00 app[web.1]: WHERE a.attrelid = '"users"'::regclass
2021-11-08T09:42:16.413608+00:00 app[web.1]: AND a.attnum > 0 AND NOT a.attisdropped
2021-11-08T09:42:16.413608+00:00 app[web.1]: ORDER BY a.attnum
2021-11-08T09:42:16.413609+00:00 app[web.1]: ):
2021-11-08T09:42:16.413632+00:00 app[web.1]: F, [2021-11-08T09:42:16.413604 #4] FATAL -- : [c3319cf1-9b37-48aa-bb4b-ef8831423776]
2021-11-08T09:42:16.413722+00:00 app[web.1]: F, [2021-11-08T09:42:16.413665 #4] FATAL -- : [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:88:in `exec'
2021-11-08T09:42:16.413722+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:88:in `block in query'
2021-11-08T09:42:16.413722+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract_adapter.rb:590:in `block in log'
2021-11-08T09:42:16.413723+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
2021-11-08T09:42:16.413723+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
2021-11-08T09:42:16.413723+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:87:in `query'
2021-11-08T09:42:16.413723+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql_adapter.rb:741:in `column_definitions'
2021-11-08T09:42:16.413724+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/postgresql/schema_statements.rb:227:in `columns'
2021-11-08T09:42:16.413724+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/schema_cache.rb:56:in `columns'
2021-11-08T09:42:16.413724+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/schema_cache.rb:62:in `columns_hash'
2021-11-08T09:42:16.413725+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/model_schema.rb:462:in `load_schema!'
2021-11-08T09:42:16.413725+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/attributes.rb:233:in `load_schema!'
2021-11-08T09:42:16.413725+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/attribute_decorators.rb:28:in `load_schema!'
2021-11-08T09:42:16.413725+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/model_schema.rb:455:in `block in load_schema'
2021-11-08T09:42:16.413726+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/model_schema.rb:452:in `synchronize'
2021-11-08T09:42:16.413726+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/model_schema.rb:452:in `load_schema'
2021-11-08T09:42:16.413726+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/model_schema.rb:353:in `attribute_types'
2021-11-08T09:42:16.413726+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/attribute_methods.rb:179:in `has_attribute?'
2021-11-08T09:42:16.413726+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/inheritance.rb:54:in `new'
2021-11-08T09:42:16.413727+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/devise-4.8.0/app/controllers/devise/sessions_controller.rb:11:in `new'
2021-11-08T09:42:16.413727+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
2021-11-08T09:42:16.413727+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/abstract_controller/base.rb:188:in `process_action'
2021-11-08T09:42:16.413727+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_controller/metal/rendering.rb:30:in `process_action'
2021-11-08T09:42:16.413727+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
2021-11-08T09:42:16.413727+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb:126:in `call'
2021-11-08T09:42:16.413729+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
2021-11-08T09:42:16.413729+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb:455:in `call'
2021-11-08T09:42:16.413729+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
2021-11-08T09:42:16.413729+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
2021-11-08T09:42:16.413730+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb:90:in `run_callbacks'
2021-11-08T09:42:16.413730+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/abstract_controller/callbacks.rb:19:in `process_action'
2021-11-08T09:42:16.413730+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_controller/metal/rescue.rb:20:in `process_action'
2021-11-08T09:42:16.413730+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
2021-11-08T09:42:16.413730+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/notifications.rb:164:in `block in instrument'
2021-11-08T09:42:16.413731+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
2021-11-08T09:42:16.413731+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/notifications.rb:164:in `instrument'
2021-11-08T09:42:16.413731+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
2021-11-08T09:42:16.413731+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
2021-11-08T09:42:16.413731+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
2021-11-08T09:42:16.413731+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/abstract_controller/base.rb:126:in `process'
2021-11-08T09:42:16.413731+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionview-5.0.7.2/lib/action_view/rendering.rb:30:in `process'
2021-11-08T09:42:16.413732+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_controller/metal.rb:190:in `dispatch'
2021-11-08T09:42:16.413732+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_controller/metal.rb:262:in `dispatch'
2021-11-08T09:42:16.413732+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
2021-11-08T09:42:16.413732+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/route_set.rb:32:in `serve'
2021-11-08T09:42:16.413732+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/mapper.rb:16:in `block in <class:Constraints>'
2021-11-08T09:42:16.413732+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/mapper.rb:46:in `serve'
2021-11-08T09:42:16.413732+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/journey/router.rb:39:in `block in serve'
2021-11-08T09:42:16.413732+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/journey/router.rb:26:in `each'
2021-11-08T09:42:16.413733+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/journey/router.rb:26:in `serve'
2021-11-08T09:42:16.413738+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/routing/route_set.rb:727:in `call'
2021-11-08T09:42:16.413739+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:36:in `block in call'
2021-11-08T09:42:16.413741+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `catch'
2021-11-08T09:42:16.413741+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `call'
2021-11-08T09:42:16.413741+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
2021-11-08T09:42:16.413742+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/conditional_get.rb:27:in `call'
2021-11-08T09:42:16.413742+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
2021-11-08T09:42:16.413742+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
2021-11-08T09:42:16.413743+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
2021-11-08T09:42:16.413743+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/cookies.rb:613:in `call'
2021-11-08T09:42:16.413743+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
2021-11-08T09:42:16.413743+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb:97:in `__run_callbacks__'
2021-11-08T09:42:16.413744+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
2021-11-08T09:42:16.413744+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb:90:in `run_callbacks'
2021-11-08T09:42:16.413744+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/callbacks.rb:36:in `call'
2021-11-08T09:42:16.413744+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
2021-11-08T09:42:16.413744+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
2021-11-08T09:42:16.413745+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
2021-11-08T09:42:16.413745+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/railties-5.0.7.2/lib/rails/rack/logger.rb:36:in `call_app'
2021-11-08T09:42:16.413745+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/railties-5.0.7.2/lib/rails/rack/logger.rb:24:in `block in call'
2021-11-08T09:42:16.413745+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/tagged_logging.rb:69:in `block in tagged'
2021-11-08T09:42:16.413745+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/tagged_logging.rb:26:in `tagged'
2021-11-08T09:42:16.413746+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/tagged_logging.rb:69:in `tagged'
2021-11-08T09:42:16.413746+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/railties-5.0.7.2/lib/rails/rack/logger.rb:24:in `call'
2021-11-08T09:42:16.413746+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/request_id.rb:24:in `call'
2021-11-08T09:42:16.413746+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
2021-11-08T09:42:16.413746+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
2021-11-08T09:42:16.413746+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2021-11-08T09:42:16.413746+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/executor.rb:12:in `call'
2021-11-08T09:42:16.413747+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/static.rb:136:in `call'
2021-11-08T09:42:16.413747+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
2021-11-08T09:42:16.413747+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/railties-5.0.7.2/lib/rails/engine.rb:522:in `call'
2021-11-08T09:42:16.413749+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/puma-3.12.6/lib/puma/configuration.rb:227:in `call'
2021-11-08T09:42:16.413749+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/puma-3.12.6/lib/puma/server.rb:706:in `handle_request'
2021-11-08T09:42:16.413749+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/puma-3.12.6/lib/puma/server.rb:476:in `process_client'
2021-11-08T09:42:16.413749+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/puma-3.12.6/lib/puma/server.rb:334:in `block in run'
2021-11-08T09:42:16.413749+00:00 app[web.1]: [c3319cf1-9b37-48aa-bb4b-ef8831423776] vendor/bundle/ruby/2.7.0/gems/puma-3.12.6/lib/puma/thread_pool.rb:135:in `block in spawn_thread'
2021-11-08T09:42:16.414459+00:00 heroku[router]: at=info method=GET path="/users/sign_in" host=campaign-appp.herokuapp.com request_id=c3319cf1-9b37-48aa-bb4b-ef8831423776 fwd="137.59.228.234" dyno=web.1 connect=0ms service=83ms status=500 bytes=1827 protocol=https
2021-11-08T09:42:17.067009+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=campaign-appp.herokuapp.com request_id=51643ef6-302b-4134-9ceb-733451917ad5 fwd="137.59.228.234" dyno=web.1 connect=0ms service=6ms status=200 bytes=143 protocol=https
因为我是 Rails 新手,所以我尝试搜索解决方案并尝试关注
How to fix a slow implicit query on pg_attribute table in Rails
Error deplying to heroku #1825
如何解决此类错误的任何提示。
【问题讨论】:
【参考方案1】:花了 5 个小时后,我发现我没有运行迁移 所以如果你遇到同样的问题,这里是给其他人的
将[app_name]
替换为您在heroku 上的应用程序名称
heroku rake db:migrate --app [app_name]
【讨论】:
【参考方案2】:生活小窍门:在 heroku CLI 上执行 heroku run rails console
会给你一个更详细的错误细分,而不是逐行查看日志。
【讨论】:
以上是关于在heroku上成功部署后Rails应用程序无法正常工作?的主要内容,如果未能解决你的问题,请参考以下文章
将 rails 应用程序从 3.2.3 迁移到 rails 4.0.0.rc2 后无法在 Heroku 上部署
在 Heroku 上使用 Rails API 部署 Create-React-App