需要帮助剖析 heroku 日志 - 应用程序在本地运行,但始终崩溃/无法使用 heroku 打开



复制并粘贴heroku日志——在这里,它没有粘贴格式良好的日志…这是我尝试部署的第一个真正的Rails应用程序,而Heroku没有它。真的不知道从这里去哪里,我将感谢帮助理解日志来解决这个问题。谢谢你!

2022-06-24T13:50:17.311515+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/builder.rb:116:in `eval'
2022-06-24T13:50:17.311517+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/builder.rb:116:in `new_from_string'
2022-06-24T13:50:17.311524+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/builder.rb:105:in `load_file'
2022-06-24T13:50:17.311524+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/builder.rb:66:in `parse_file'
2022-06-24T13:50:17.311526+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/server.rb:349:in `build_app_and_options_from_config'
2022-06-24T13:50:17.311533+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/server.rb:249:in `app'
2022-06-24T13:50:17.311533+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/server.rb:422:in `wrapped_app'
2022-06-24T13:50:17.311540+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/server.rb:312:in `block in start'
2022-06-24T13:50:17.311540+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/server.rb:379:in `handle_profiling'
2022-06-24T13:50:17.311541+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/server.rb:311:in `start'
2022-06-24T13:50:17.311548+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:38:in `start'
2022-06-24T13:50:17.311548+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:143:in `block in perform'
2022-06-24T13:50:17.311551+00:00 app[web.1]: from <internal:kernel>:90:in `tap'
2022-06-24T13:50:17.311557+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:134:in `perform'
2022-06-24T13:50:17.311557+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
2022-06-24T13:50:17.311564+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
2022-06-24T13:50:17.311564+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
2022-06-24T13:50:17.311566+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/command/base.rb:87:in `perform'
2022-06-24T13:50:17.311572+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/command.rb:48:in `invoke'
2022-06-24T13:50:17.311572+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/commands.rb:18:in `<main>'
2022-06-24T13:50:17.311579+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
2022-06-24T13:50:17.311580+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
2022-06-24T13:50:17.311581+00:00 app[web.1]: from bin/rails:4:in `<main>'
2022-06-24T13:50:17.431963+00:00 heroku[web.1]: Process exited with status 1
2022-06-24T13:50:17.477847+00:00 heroku[web.1]: State changed from starting to crashed
2022-06-24T13:50:17.499787+00:00 heroku[web.1]: State changed from crashed to starting
2022-06-24T13:50:20.445347+00:00 heroku[web.1]: Starting process with command `bin/rails server -p ${PORT:-5000} -e production`
2022-06-24T13:50:22.925680+00:00 app[web.1]: => Booting Puma
2022-06-24T13:50:22.925695+00:00 app[web.1]: => Rails 7.0.3 application starting in production
2022-06-24T13:50:22.925695+00:00 app[web.1]: => Run `bin/rails server --help` for more startup options
2022-06-24T13:50:23.229561+00:00 app[web.1]: Exiting
2022-06-24T13:50:23.229722+00:00 app[web.1]: /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require': /app/app/controllers/application_controller.rb:6: syntax error, unexpected `end', expecting end-of-input (SyntaxError)
2022-06-24T13:50:23.229724+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
2022-06-24T13:50:23.229734+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:27:in `require'
2022-06-24T13:50:23.229736+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:127:in `const_get'
2022-06-24T13:50:23.229746+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:127:in `cget'
2022-06-24T13:50:23.229748+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader.rb:239:in `block (2 levels) in eager_load'
2022-06-24T13:50:23.229757+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:41:in `block in ls'
2022-06-24T13:50:23.229759+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:27:in `each'
2022-06-24T13:50:23.229768+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader/helpers.rb:27:in `ls'
2022-06-24T13:50:23.229771+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader.rb:234:in `block in eager_load'
2022-06-24T13:50:23.229779+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader.rb:219:in `synchronize'
2022-06-24T13:50:23.229781+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader.rb:219:in `eager_load'
2022-06-24T13:50:23.229790+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader.rb:318:in `each'
2022-06-24T13:50:23.229792+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.0/lib/zeitwerk/loader.rb:318:in `eager_load_all'
2022-06-24T13:50:23.229801+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/application/finisher.rb:74:in `block in <module:Finisher>'
2022-06-24T13:50:23.229803+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
2022-06-24T13:50:23.229812+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
2022-06-24T13:50:23.229814+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
2022-06-24T13:50:23.229824+00:00 app[web.1]: from /app/vendor/ruby-3.1.2/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
2022-06-24T13:50:23.229826+00:00 app[web.1]: from /app/vendor/ruby-3.1.2/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
2022-06-24T13:50:23.229835+00:00 app[web.1]: from /app/vendor/ruby-3.1.2/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
2022-06-24T13:50:23.229837+00:00 app[web.1]: from /app/vendor/ruby-3.1.2/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
2022-06-24T13:50:23.229846+00:00 app[web.1]: from /app/vendor/ruby-3.1.2/lib/ruby/3.1.0/tsort.rb:347:in `each'
2022-06-24T13:50:23.229849+00:00 app[web.1]: from /app/vendor/ruby-3.1.2/lib/ruby/3.1.0/tsort.rb:347:in `call'
2022-06-24T13:50:23.229850+00:00 app[web.1]: from /app/vendor/ruby-3.1.2/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
2022-06-24T13:50:23.229861+00:00 app[web.1]: from /app/vendor/ruby-3.1.2/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
2022-06-24T13:50:23.229863+00:00 app[web.1]: from /app/vendor/ruby-3.1.2/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
2022-06-24T13:50:23.229873+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
2022-06-24T13:50:23.229875+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
2022-06-24T13:50:23.229893+00:00 app[web.1]: from /app/config/environment.rb:5:in `<main>'
2022-06-24T13:50:23.229895+00:00 app[web.1]: from config.ru:3:in `require_relative'
2022-06-24T13:50:23.229895+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2022-06-24T13:50:23.229895+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/builder.rb:116:in `eval'
2022-06-24T13:50:23.229897+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/builder.rb:116:in `new_from_string'
2022-06-24T13:50:23.229899+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/builder.rb:105:in `load_file'
2022-06-24T13:50:23.229909+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/builder.rb:66:in `parse_file'
2022-06-24T13:50:23.229911+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/server.rb:349:in `build_app_and_options_from_config'
2022-06-24T13:50:23.229920+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/server.rb:249:in `app'
2022-06-24T13:50:23.229922+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/server.rb:422:in `wrapped_app'
2022-06-24T13:50:23.229931+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/server.rb:312:in `block in start'
2022-06-24T13:50:23.229933+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/server.rb:379:in `handle_profiling'
2022-06-24T13:50:23.229941+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3.1/lib/rack/server.rb:311:in `start'
2022-06-24T13:50:23.229944+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:38:in `start'
2022-06-24T13:50:23.229952+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:143:in `block in perform'
2022-06-24T13:50:23.229954+00:00 app[web.1]: from <internal:kernel>:90:in `tap'
2022-06-24T13:50:23.229963+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:134:in `perform'
2022-06-24T13:50:23.229965+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
2022-06-24T13:50:23.229975+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
2022-06-24T13:50:23.229977+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
2022-06-24T13:50:23.229987+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/command/base.rb:87:in `perform'
2022-06-24T13:50:23.229989+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/command.rb:48:in `invoke'
2022-06-24T13:50:23.229998+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3/lib/rails/commands.rb:18:in `<main>'
2022-06-24T13:50:23.230000+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
2022-06-24T13:50:23.230009+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
2022-06-24T13:50:23.230018+00:00 app[web.1]: from bin/rails:4:in `<main>'
2022-06-24T13:50:23.380834+00:00 heroku[web.1]: Process exited with status 1
2022-06-24T13:50:23.422776+00:00 heroku[web.1]: State changed from starting to crashed
2022-06-24T13:50:24.512528+00:00 app[api]: Starting process with command `bundle exec rake db:migrate` by user jack282323@gmail.com
2022-06-24T13:50:28.030796+00:00 heroku[run.5346]: State changed from starting to up
2022-06-24T13:50:28.225466+00:00 heroku[run.5346]: Awaiting client
2022-06-24T13:50:28.246459+00:00 heroku[run.5346]: Starting process with command `bundle exec rake db:migrate`
2022-06-24T13:50:36.326947+00:00 heroku[run.5346]: Process exited with status 0
2022-06-24T13:50:36.457648+00:00 heroku[run.5346]: State changed from up to complete
2022-06-24T13:51:11.983953+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=whispering-waters-61972.herokuapp.com request_id=f6d16d71-e463-46ee-8354-8bb946d3092d fwd="179.49.42.237" dyno= connect= service= status=503 bytes= protocol=https
2022-06-24T13:51:12.799063+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=whispering-waters-61972.herokuapp.com request_id=c5a2d8fb-2d28-4c97-921f-23fa64cc9ee2 fwd="179.49.42.237" dyno= connect= service= status=503 bytes= protocol=https
2022-06-24T13:52:03.935764+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=whispering-waters-61972.herokuapp.com request_id=e949196d-1ff0-4cab-9d7f-d2a459c750aa fwd="179.49.42.237" dyno= connect= service= status=503 bytes= protocol=https
2022-06-24T13:52:04.279241+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=whispering-waters-61972.herokuapp.com request_id=c7d2fc96-312e-4c7e-aff6-506cab45ebc4 fwd="179.49.42.237" dyno= connect= service= status=503 bytes= protocol=https
2022-06-24T13:52:06.802759+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=whispering-waters-61972.herokuapp.com request_id=45f7f405-993a-496c-be01-d12c38c7a255 fwd="179.49.42.237" dyno= connect= service= status=503 bytes= protocol=https
2022-06-24T13:52:07.019043+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=whispering-waters-61972.herokuapp.com request_id=8d2ad5bc-0730-4421-8c36-78d949572b16 fwd="179.49.42.237" dyno= connect= service= status=503 bytes= protocol=https```

你的错误日志中的这一行对我来说是最令人震惊的:

[...] `require': /app/app/controllers/application_controller.rb:6: syntax error, unexpected `end', expecting end-of-input (SyntaxError)

app/controllers/application_controller.rb的含量是多少?看起来有一个语法错误,导致应用程序无法加载。

我怀疑你把end放了两次,错了?

如果您在本地运行应用程序(rails serverrails console),那么我希望您也会看到相同的错误。

相关内容

  • 没有找到相关文章

最新更新