ookunirina / my_cinema_record

0 stars 0 forks source link

Herokuへのデプロイを完了したい #71

Closed ookunirina closed 1 year ago

ookunirina commented 1 year ago

質問内容・実現したいこと

herokuへのデプロイを完了させたいです。

現状発生している問題・エラーメッセージ

heroku openを、実行した際にアプリが表示されず以下の画面になります。 Image from Gyazo

heroku logs --tailを、実行した際に下記ログが表示されます。

2023-08-28T16:54:21.812064+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/builder.rb:66:in `parse_file'
2023-08-28T16:54:21.812065+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:349:in `build_app_and_options_from_config'
2023-08-28T16:54:21.812065+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:249:in `app'
2023-08-28T16:54:21.812065+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:422:in `wrapped_app'
2023-08-28T16:54:21.812065+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:312:in `block in start'
2023-08-28T16:54:21.812065+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:379:in `handle_profiling'
2023-08-28T16:54:21.812065+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:311:in `start'
2023-08-28T16:54:21.812065+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/commands/server/server_command.rb:38:in `start'
2023-08-28T16:54:21.812066+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/commands/server/server_command.rb:143:in `block in perform'
2023-08-28T16:54:21.812066+00:00 app[web.1]: from <internal:kernel>:90:in `tap'
2023-08-28T16:54:21.812066+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/commands/server/server_command.rb:134:in `perform'
2023-08-28T16:54:21.812066+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
2023-08-28T16:54:21.812066+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
2023-08-28T16:54:21.812066+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
2023-08-28T16:54:21.812067+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/command/base.rb:87:in `perform'
2023-08-28T16:54:21.812067+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/command.rb:48:in `invoke'
2023-08-28T16:54:21.812067+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/commands.rb:18:in `<main>'
2023-08-28T16:54:21.812067+00:00 app[web.1]: from <internal:/app/vendor/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
2023-08-28T16:54:21.812067+00:00 app[web.1]: from <internal:/app/vendor/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
2023-08-28T16:54:21.812067+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
2023-08-28T16:54:21.812068+00:00 app[web.1]: from bin/rails:4:in `<main>'
2023-08-28T16:54:21.812070+00:00 app[web.1]: /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/psych/parser.rb:62:in `_native_parse': (<unknown>): did not find expected key while parsing a block mapping at line 1 column 1 (Psych::SyntaxError)
2023-08-28T16:54:21.812070+00:00 app[web.1]: from /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/psych/parser.rb:62:in `parse'
2023-08-28T16:54:21.812070+00:00 app[web.1]: from /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/psych.rb:455:in `parse_stream'
2023-08-28T16:54:21.812070+00:00 app[web.1]: from /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/psych.rb:399:in `parse'
2023-08-28T16:54:21.812070+00:00 app[web.1]: from /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/psych.rb:272:in `unsafe_load'
2023-08-28T16:54:21.812072+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/configuration_file.rb:24:in `parse'
2023-08-28T16:54:21.812072+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/configuration_file.rb:18:in `parse'
2023-08-28T16:54:21.812073+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/activestorage-7.0.4.3/lib/active_storage/engine.rb:149:in `block (2 levels) in <class:Engine>'
2023-08-28T16:54:21.812073+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/lazy_load_hooks.rb:95:in `class_eval'
2023-08-28T16:54:21.812073+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/lazy_load_hooks.rb:95:in `block in execute_hook'
2023-08-28T16:54:21.812073+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/lazy_load_hooks.rb:85:in `with_execution_control'
2023-08-28T16:54:21.812073+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/lazy_load_hooks.rb:90:in `execute_hook'
2023-08-28T16:54:21.812074+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/lazy_load_hooks.rb:76:in `block in run_load_hooks'
2023-08-28T16:54:21.812074+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/lazy_load_hooks.rb:75:in `each'
2023-08-28T16:54:21.812074+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.4.3/lib/active_support/lazy_load_hooks.rb:75:in `run_load_hooks'
2023-08-28T16:54:21.812074+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/activestorage-7.0.4.3/app/models/active_storage/blob.rb:410:in `<main>'
2023-08-28T16:54:21.812075+00:00 app[web.1]: from <internal:/app/vendor/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
2023-08-28T16:54:21.812075+00:00 app[web.1]: from <internal:/app/vendor/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
2023-08-28T16:54:21.812075+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
2023-08-28T16:54:21.812075+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:30:in `require'
2023-08-28T16:54:21.812076+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/helpers.rb:135:in `const_get'
2023-08-28T16:54:21.812076+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/helpers.rb:135:in `cget'
2023-08-28T16:54:21.812077+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/eager_load.rb:176:in `block in actual_eager_load_dir'
2023-08-28T16:54:21.812077+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/helpers.rb:40:in `block in ls'
2023-08-28T16:54:21.812077+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/helpers.rb:25:in `each'
2023-08-28T16:54:21.812077+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/helpers.rb:25:in `ls'
2023-08-28T16:54:21.812077+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/eager_load.rb:164:in `actual_eager_load_dir'
2023-08-28T16:54:21.812078+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/eager_load.rb:17:in `block (2 levels) in eager_load'
2023-08-28T16:54:21.812078+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/eager_load.rb:16:in `each'
2023-08-28T16:54:21.812078+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/eager_load.rb:16:in `block in eager_load'
2023-08-28T16:54:21.812078+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/eager_load.rb:10:in `synchronize'
2023-08-28T16:54:21.812078+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/eager_load.rb:10:in `eager_load'
2023-08-28T16:54:21.812078+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader.rb:329:in `block in eager_load_all'
2023-08-28T16:54:21.812079+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader.rb:327:in `each'
2023-08-28T16:54:21.812079+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader.rb:327:in `eager_load_all'
2023-08-28T16:54:21.812079+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/application/finisher.rb:74:in `block in <module:Finisher>'
2023-08-28T16:54:21.812079+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/initializable.rb:32:in `instance_exec'
2023-08-28T16:54:21.812080+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/initializable.rb:32:in `run'
2023-08-28T16:54:21.812080+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/initializable.rb:61:in `block in run_initializers'
2023-08-28T16:54:21.812080+00:00 app[web.1]: from /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:228:in `block in tsort_each'
2023-08-28T16:54:21.812080+00:00 app[web.1]: from /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
2023-08-28T16:54:21.812082+00:00 app[web.1]: from /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:431:in `each_strongly_connected_component_from'
2023-08-28T16:54:21.812082+00:00 app[web.1]: from /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:349:in `block in each_strongly_connected_component'
2023-08-28T16:54:21.812082+00:00 app[web.1]: from /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:347:in `each'
2023-08-28T16:54:21.812082+00:00 app[web.1]: from /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:347:in `call'
2023-08-28T16:54:21.812082+00:00 app[web.1]: from /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:347:in `each_strongly_connected_component'
2023-08-28T16:54:21.812083+00:00 app[web.1]: from /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:226:in `tsort_each'
2023-08-28T16:54:21.812083+00:00 app[web.1]: from /app/vendor/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:205:in `tsort_each'
2023-08-28T16:54:21.812083+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/initializable.rb:60:in `run_initializers'
2023-08-28T16:54:21.812083+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/application.rb:372:in `initialize!'
2023-08-28T16:54:21.812083+00:00 app[web.1]: from /app/config/environment.rb:5:in `<main>'
2023-08-28T16:54:21.812084+00:00 app[web.1]: from config.ru:3:in `require_relative'
2023-08-28T16:54:21.812084+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2023-08-28T16:54:21.812084+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/builder.rb:116:in `eval'
2023-08-28T16:54:21.812084+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/builder.rb:116:in `new_from_string'
2023-08-28T16:54:21.812084+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/builder.rb:105:in `load_file'
2023-08-28T16:54:21.812084+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/builder.rb:66:in `parse_file'
2023-08-28T16:54:21.812084+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:349:in `build_app_and_options_from_config'
2023-08-28T16:54:21.812085+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:249:in `app'
2023-08-28T16:54:21.812085+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:422:in `wrapped_app'
2023-08-28T16:54:21.812085+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:312:in `block in start'
2023-08-28T16:54:21.812085+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:379:in `handle_profiling'
2023-08-28T16:54:21.812085+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:311:in `start'
2023-08-28T16:54:21.812085+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/commands/server/server_command.rb:38:in `start'
2023-08-28T16:54:21.812086+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/commands/server/server_command.rb:143:in `block in perform'
2023-08-28T16:54:21.812086+00:00 app[web.1]: from <internal:kernel>:90:in `tap'
2023-08-28T16:54:21.812086+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/commands/server/server_command.rb:134:in `perform'
2023-08-28T16:54:21.812086+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
2023-08-28T16:54:21.812086+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
2023-08-28T16:54:21.812087+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
2023-08-28T16:54:21.812087+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/command/base.rb:87:in `perform'
2023-08-28T16:54:21.812087+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/command.rb:48:in `invoke'
2023-08-28T16:54:21.812087+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/railties-7.0.4.3/lib/rails/commands.rb:18:in `<main>'
2023-08-28T16:54:21.812087+00:00 app[web.1]: from <internal:/app/vendor/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
2023-08-28T16:54:21.812088+00:00 app[web.1]: from <internal:/app/vendor/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
2023-08-28T16:54:21.812088+00:00 app[web.1]: from /app/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
2023-08-28T16:54:21.812088+00:00 app[web.1]: from bin/rails:4:in `<main>'
2023-08-28T16:54:21.951071+00:00 heroku[web.1]: Process exited with status 1
2023-08-28T16:54:21.982125+00:00 heroku[web.1]: State changed from starting to crashed

どの処理までうまく動いているのか

RailsアプリとHerokuの紐付けまで完了しております。

試したこと

一度アプリを削除してもう一度 heroku create 好きなアプリ名 git push heroku main heroku run rails db:migrate heroku open を実行しましたが同じ状態でした。

お手数ではございますがご教授のほど、よろしくお願いいたします。

kerochelo commented 1 year ago

@ookunirina 全体のログ内容も見せていただければです。 載せていただいたエラーの中からあり得そうな部分としてはこの部分を参考に調べてみるといいかと!

did not find expected key while parsing a block mapping

ookunirina commented 1 year ago

コメントありがとうございます。

did not find expected key while parsing a block mappingを調べた際に

YAMLファイルを扱う際に見つかるもので、YAMLファイルの構文が正しくないことを示しています。「did not find expected key while parsing a block mapping」というエラーは、マッピング(キーと値のペア)が期待されている部分でキーが見つからなかったことを意味します。

との事でしたので、 4377fa3でのconfig/storage.ymlでインデント間違いがあり #72 にて修正し、heroku openを、実行した際にアプリが表示される様になりました。

ありがとうございました。