Heroku应用程序错误,无法理解日志文件

时间:2020-11-04 12:28:19

标签: heroku-postgres

当我运行该应用程序时,我收到“应用程序错误”消息,该应用程序最初是在Rails上使用ruby创建的,通常在本地Rails服务器上运行,并且我正尝试部署到heroku,修改了gemfile和db文件,这是运行heroku logs --tail时得到的信息:

2020-11-04T12:11:30.972666+00:00 app[web.1]: /app/vendor/ruby-2.7.2/lib/ruby/2.7.0/psych.rb:456:in `parse': (<unknown>): did not find expected key while parsing a block mapping at line 7 column 1 (Psych::SyntaxError)
2020-11-04T12:11:30.972671+00:00 app[web.1]: from /app/vendor/ruby-2.7.2/lib/ruby/2.7.0/psych.rb:456:in `parse_stream'
2020-11-04T12:11:30.972671+00:00 app[web.1]: from /app/vendor/ruby-2.7.2/lib/ruby/2.7.0/psych.rb:390:in `parse'
2020-11-04T12:11:30.972672+00:00 app[web.1]: from /app/vendor/ruby-2.7.2/lib/ruby/2.7.0/psych.rb:277:in `load'
2020-11-04T12:11:30.972672+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/application/configuration.rb:228:in `database_configuration'
2020-11-04T12:11:30.972675+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/railtie.rb:200:in `block (2 levels) in <class:Railtie>'
2020-11-04T12:11:30.972675+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/lazy_load_hooks.rb:71:in `class_eval'
2020-11-04T12:11:30.972678+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
2020-11-04T12:11:30.972680+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
2020-11-04T12:11:30.972682+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
2020-11-04T12:11:30.972684+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
2020-11-04T12:11:30.972702+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/lazy_load_hooks.rb:51:in `each'
2020-11-04T12:11:30.972703+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
2020-11-04T12:11:30.972703+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/base.rb:327:in `<module:ActiveRecord>'
2020-11-04T12:11:30.972707+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/base.rb:27:in `<main>'
2020-11-04T12:11:30.972707+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
2020-11-04T12:11:30.972710+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
2020-11-04T12:11:30.972710+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
2020-11-04T12:11:30.972713+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
2020-11-04T12:11:30.972734+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
2020-11-04T12:11:30.972734+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.1/lib/zeitwerk/kernel.rb:33:in `require'
2020-11-04T12:11:30.972735+00:00 app[web.1]: from /app/app/models/application_record.rb:1:in `<main>'
2020-11-04T12:11:30.972735+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
2020-11-04T12:11:30.972737+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
2020-11-04T12:11:30.972738+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
2020-11-04T12:11:30.972740+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
2020-11-04T12:11:30.972742+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
2020-11-04T12:11:30.972744+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.1/lib/zeitwerk/kernel.rb:26:in `require'
2020-11-04T12:11:30.972747+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.1/lib/zeitwerk/loader.rb:387:in `const_get'
2020-11-04T12:11:30.972768+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.1/lib/zeitwerk/loader.rb:387:in `block (2 levels) in eager_load'
2020-11-04T12:11:30.972769+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.1/lib/zeitwerk/loader.rb:711:in `block in ls'
2020-11-04T12:11:30.972769+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.1/lib/zeitwerk/loader.rb:703:in `foreach'
2020-11-04T12:11:30.972770+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.1/lib/zeitwerk/loader.rb:703:in `ls'
2020-11-04T12:11:30.972770+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.1/lib/zeitwerk/loader.rb:382:in `block in eager_load'
2020-11-04T12:11:30.972774+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.1/lib/zeitwerk/loader.rb:371:in `synchronize'
2020-11-04T12:11:30.972775+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.1/lib/zeitwerk/loader.rb:371:in `eager_load'
2020-11-04T12:11:30.972777+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.1/lib/zeitwerk/loader.rb:486:in `each'
2020-11-04T12:11:30.972778+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.1/lib/zeitwerk/loader.rb:486:in `eager_load_all'
2020-11-04T12:11:30.972780+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/application/finisher.rb:122:in `block in <module:Finisher>'
2020-11-04T12:11:30.972782+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/initializable.rb:32:in `instance_exec'
2020-11-04T12:11:30.972785+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/initializable.rb:32:in `run'
2020-11-04T12:11:30.972804+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/initializable.rb:61:in `block in run_initializers'
2020-11-04T12:11:30.972804+00:00 app[web.1]: from /app/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
2020-11-04T12:11:30.972804+00:00 app[web.1]: from /app/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
2020-11-04T12:11:30.972805+00:00 app[web.1]: from /app/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
2020-11-04T12:11:30.972807+00:00 app[web.1]: from /app/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
2020-11-04T12:11:30.972807+00:00 app[web.1]: from /app/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `each'
2020-11-04T12:11:30.972810+00:00 app[web.1]: from /app/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `call'
2020-11-04T12:11:30.972812+00:00 app[web.1]: from /app/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
2020-11-04T12:11:30.972815+00:00 app[web.1]: from /app/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
2020-11-04T12:11:30.972817+00:00 app[web.1]: from /app/vendor/ruby-2.7.2/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
2020-11-04T12:11:30.972836+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/initializable.rb:60:in `run_initializers'
2020-11-04T12:11:30.972836+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/application.rb:363:in `initialize!'
2020-11-04T12:11:30.972836+00:00 app[web.1]: from /app/config/environment.rb:5:in `<main>'
2020-11-04T12:11:30.972837+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
2020-11-04T12:11:30.972839+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
2020-11-04T12:11:30.972840+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
2020-11-04T12:11:30.972842+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
2020-11-04T12:11:30.972844+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
2020-11-04T12:11:30.972861+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.1/lib/zeitwerk/kernel.rb:33:in `require'
2020-11-04T12:11:30.972862+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `block in require'
2020-11-04T12:11:30.972862+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in `load_dependency'
2020-11-04T12:11:30.972864+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
2020-11-04T12:11:30.972866+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:53:in `require_relative'
2020-11-04T12:11:30.972867+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2020-11-04T12:11:30.972869+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
2020-11-04T12:11:30.972871+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
2020-11-04T12:11:30.972888+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
2020-11-04T12:11:30.972889+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
2020-11-04T12:11:30.972889+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
2020-11-04T12:11:30.972890+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
2020-11-04T12:11:30.972892+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
2020-11-04T12:11:30.972894+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:312:in `block in start'
2020-11-04T12:11:30.972896+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:379:in `handle_profiling'
2020-11-04T12:11:30.972913+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:311:in `start'
2020-11-04T12:11:30.972914+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/commands/server/server_command.rb:39:in `start'
2020-11-04T12:11:30.972914+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/commands/server/server_command.rb:147:in `block in perform'
2020-11-04T12:11:30.972914+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/commands/server/server_command.rb:138:in `tap'
2020-11-04T12:11:30.972917+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/commands/server/server_command.rb:138:in `perform'
2020-11-04T12:11:30.972939+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
2020-11-04T12:11:30.972940+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
2020-11-04T12:11:30.972940+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
2020-11-04T12:11:30.972940+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/command/base.rb:69:in `perform'
2020-11-04T12:11:30.972941+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/command.rb:46:in `invoke'
2020-11-04T12:11:30.972941+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.4/lib/rails/commands.rb:18:in `<main>'
2020-11-04T12:11:30.972942+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
2020-11-04T12:11:30.972942+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
2020-11-04T12:11:30.972944+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
2020-11-04T12:11:30.972945+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
2020-11-04T12:11:30.972945+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
2020-11-04T12:11:30.972947+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `block in require'
2020-11-04T12:11:30.972967+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in `load_dependency'
2020-11-04T12:11:30.972968+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
2020-11-04T12:11:30.972968+00:00 app[web.1]: from bin/rails:4:in `<main>'
2020-11-04T12:11:31.043454+00:00 heroku[web.1]: Process exited with status 1
2020-11-04T12:11:31.076414+00:00 heroku[web.1]: State changed from starting to crashed
2020-11-04T12:11:50.686699+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=stormy-taiga-90658.herokuapp.com request_id=d9fa1626-2cda-4039-977c-61c81a0402b3 fwd="196.158.140.61" dyno= connect= service= status=503 bytes= protocol=https
2020-11-04T12:11:51.693479+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=stormy-taiga-90658.herokuapp.com request_id=a8764c9b-1deb-49dd-9457-8f66f3489d5a fwd="196.158.140.61" dyno= connect= service= status=503 bytes= protocol=https
2020-11-04T12:13:14.203621+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=stormy-taiga-90658.herokuapp.com request_id=a11633c0-7422-4e98-ae59-19532ed046e9 fwd="196.158.140.61" dyno= connect= service= status=503 bytes= protocol=https
2020-11-04T12:13:14.814209+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=stormy-taiga-90658.herokuapp.com request_id=86daa46a-0450-4da5-ae2a-e6ed7f0f8826 fwd="196.158.140.61" dyno= connect= service= status=503 bytes= protocol=https

我使用Windows安装程序安装了postgresql,并按照所有说明进行操作。

1 个答案:

答案 0 :(得分:0)

您尝试解析的.yml文件似乎格式错误。这是在configuration.rb的第228行中发生的,这时函数“ database_configuration”在期待键的同时收到了其他内容。您应该验证在第228行馈送给该函数的yml文件的格式正确,缩进良好,引号正确到位等。

相关问题