どうしたらApplication errorが解決できるでしょうか?
Rails tutorialの第4章を終え、5章に入る前にブラウザ上で見た目を確認したいと思い、Herokuでアプリをデプロイし、その後heroku openを試してみました。
しかしブラウザには以下のようなメッセージが発生。
詳細なエラーの原因を知る手段として、
heroku run rails console
があることを知ったので、実際にコマンドラインで試したところ、以下のようなエラー文が表示されました。
〜文字数の関係で省略〜 5.2.3/lib/rails/initializable.rb:61:in `block in run_initializers' 62: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `run' 61: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `instance_exec' 60: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>' 59: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/application/finisher.rb:69:in `each' 58: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:356:in `eager_load!' 57: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:475:in `eager_load!' 56: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:475:in `each' 55: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:477:in `block in eager_load!' 54: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:477:in `each' 53: from /app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.3/lib/rails/engine.rb:478:in `block (2 levels) in eager_load!' 52: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:246:in `require_dependency' 51: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/active_support.rb:85:in `depend_on' 50: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:334:in `depend_on' 49: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/active_support.rb:47:in `require_or_load' 48: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry' 47: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/active_support.rb:48:in `block in require_or_load' 46: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:356:in `require_or_load' 45: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:37:in `load_interlock' 44: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:13:in `loading' 43: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/concurrency/share_lock.rb:151:in `exclusive' 42: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies/interlock.rb:14:in `block in loading' 41: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:37:in `block in load_interlock' 40: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:378:in `block in require_or_load' 39: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require' 38: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency' 37: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require' 36: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' 35: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi' 34: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 33: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi' 32: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require' 31: from /app/vendor/bundle/ruby/2.5.0/gems/activestorage-5.2.3/app/models/active_storage/attachment.rb:9:in `<main>' 30: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require' 29: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency' 28: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require' 27: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' 26: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi' 25: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 24: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi' 23: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require' 22: from /app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.3/lib/active_record/base.rb:27:in `<main>' 21: from /app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.3/lib/active_record/base.rb:328:in `<module:ActiveRecord>' 20: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks' 19: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:51:in `each' 18: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks' 17: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook' 16: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control' 15: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook' 14: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval' 13: from /app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.3/lib/active_record/railtie.rb:136:in `block (2 levels) in <class:Railtie>' 12: from /app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:60:in `establish_connection' 11: from /app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:956:in `establish_connection' 10: from /app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/connection_specification.rb:191:in `spec' 9: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require' 8: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency' 7: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require' 6: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' 5: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi' 4: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 3: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi' 2: from /app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require' 1: from /app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/sqlite3_adapter.rb:12:in `<main>' /app/vendor/bundle/ruby/2.5.0/gems/bundler-2.0.1/lib/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem': Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? sqlite3 is not part of the bundle. Add it to your Gemfile. (LoadError)
ちなみにsqlite3はgemfileにすでに記入してあり、bundle install済みです。
どなたか解決策をお持ちの方はいらっしゃいませんでしょうか?
よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/05/31 14:57
2019/05/31 14:57
退会済みユーザー
2019/06/03 02:20 編集
退会済みユーザー
2019/06/03 02:22