herokuにデプロイはできるがそのサイトが表示されない。
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
と表示されてしまいます。
gemに問題があると思い色々試していますがうまくいきません。
heroku logs --tail実行
2019-10-09T10:45:03.895734+00:00 heroku[run.7257]: State changed from starting to up 2019-10-09T10:45:05.190857+00:00 heroku[run.7257]: source=run.7257 dyno=heroku.148793023.43bfa9c9-0f75-4064-ac18-10a616fa1e34 sample#memory_total=0.08MB sample#memory_rss=0.08MB sample#memory_cache=0.00MB sample#memory_swap=0.00MB sample#memory_pgpgin=60pages sample#memory_pgpgout=39pages sample#memory_quota=512.00MB 2019-10-09T10:45:12.081161+00:00 heroku[run.7257]: Process exited with status 1 2019-10-09T10:45:12.128574+00:00 heroku[run.7257]: State changed from up to complete 2019-10-09T10:45:32.323559+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dartsmark.herokuapp.com request_id=c929822e-5f6f-408c-b696-8914911c2a20 fwd="119.243.222.175" dyno= connect= service= status=503 bytes= protocol=https 2019-10-09T10:45:33.042298+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=dartsmark.herokuapp.com request_id=b536e3d4-b102-459a-bafa-9963574cd361 fwd="119.243.222.175" dyno= connect= service= status=503 bytes= protocol=https 2019-10-09T10:45:35.04527+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dartsmark.herokuapp.com request_id=b291b1eb-0547-44e0-8c81-402229304029 fwd="119.243.222.175" dyno= connect= service= status=503 bytes= protocol=https 2019-10-09T10:45:35.735436+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=dartsmark.herokuapp.com request_id=e7966601-e9f0-46df-bf13-761b54fd91cd fwd="119.243.222.175" dyno= connect= service= status=503 bytes= protocol=https 2019-10-09T10:45:54.617928+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dartsmark.herokuapp.com request_id=8bfe407e-174f-4763-a124-4daf595408cc fwd="119.243.222.175" dyno= connect= service= status=503 bytes= protocol=https 2019-10-09T10:45:55.432733+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=dartsmark.herokuapp.com request_id=910dc045-c4d4-4bae-9d91-3956812d0764 fwd="119.243.222.175" dyno= connect= service= status=503 bytes= protocol=https 2019-10-09T10:46:56.66108+00:00 app[api]: Starting process with command `rails console` by user rrrpiriod@gmail.com 2019-10-09T10:47:01.101393+00:00 heroku[run.1961]: State changed from starting to up 2019-10-09T10:47:08.328217+00:00 heroku[run.1961]: Process exited with status 1 2019-10-09T10:47:08.381582+00:00 heroku[run.1961]: State changed from up to complete 2019-10-09T10:49:57.78837+00:00 app[api]: Starting process with command `rails console` by user rrrpiriod@gmail.com 2019-10-09T10:50:01.731897+00:00 heroku[run.3379]: State changed from starting to up 2019-10-09T10:50:08.42871+00:00 heroku[run.3379]: Process exited with status 1 2019-10-09T10:50:08.478599+00:00 heroku[run.3379]: State changed from up to complete 2019-10-09T10:52:39.932522+00:00 app[api]: Starting process with command `rails console` by user rrrpiriod@gmail.com 2019-10-09T10:52:45.7922+00:00 heroku[run.7288]: State changed from starting to up 2019-10-09T10:52:53.669322+00:00 heroku[run.7288]: Process exited with status 1 2019-10-09T10:52:53.715486+00:00 heroku[run.7288]: State changed from up to complete 2019-10-09T10:55:07.104046+00:00 app[api]: Starting process with command `rails console` by user rrrpiriod@gmail.com 2019-10-09T10:55:11.729636+00:00 heroku[run.1826]: State changed from starting to up 2019-10-09T10:55:20.053221+00:00 heroku[run.1826]: Process exited with status 1 2019-10-09T10:55:20.099228+00:00 heroku[run.1826]: State changed from up to complete 2019-10-09T10:57:30.28902+00:00 app[api]: Starting process with command `rails console` by user rrrpiriod@gmail.com 2019-10-09T10:57:34.272214+00:00 heroku[run.6243]: State changed from starting to up 2019-10-09T10:57:40.523181+00:00 heroku[run.6243]: Process exited with status 1 2019-10-09T10:57:40.56432+00:00 heroku[run.6243]: State changed from up to complete 2019-10-09T10:57:49.03431+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dartsmark.herokuapp.com request_id=653a5dac-c104-402e-a060-9a1c3c92f66e fwd="119.243.222.175" dyno= connect= service= status=503 bytes= protocol=https 2019-10-09T10:57:49.865883+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=dartsmark.herokuapp.com request_id=7a0b23c4-2a19-43bc-ab5b-866fc10fd882 fwd="119.243.222.175" dyno= connect= service= status=503 bytes= protocol=https 2019-10-09T10:58:29.554491+00:00 app[api]: Starting process with command `rails console --sandbox` by user rrrpiriod@gmail.com 2019-10-09T10:58:34.909619+00:00 heroku[run.6501]: State changed from starting to up 2019-10-09T10:58:42.414314+00:00 heroku[run.6501]: Process exited with status 1 2019-10-09T10:58:42.465499+00:00 heroku[run.6501]: State changed from up to complete 2019-10-09T11:04:24.813772+00:00 app[api]: Starting process with command `rails console` by user rrrpiriod@gmail.com 2019-10-09T11:04:28.876837+00:00 heroku[run.6261]: State changed from starting to up 2019-10-09T11:04:36.719868+00:00 heroku[run.6261]: Process exited with status 1 2019-10-09T11:04:36.764401+00:00 heroku[run.6261]: State changed from up to complete 2019-10-09T11:07:48.176634+00:00 heroku[web.1]: State changed from crashed to starting 2019-10-09T11:07:51.444108+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 48215 -e production` 2019-10-09T11:07:55.600855+00:00 heroku[web.1]: Process exited with status 1 2019-10-09T11:07:55.657245+00:00 heroku[web.1]: State changed from starting to crashed
2019-10-09T11:07:55.538975+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/rubygems_integration.rb:406: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)
heroku run rails consoleを実行しようとすると次のエラーで止まってしまいます。
1: from /app/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/sqlite3_adapter.rb:12:in `<main>' /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/rubygems_integration.rb:406:in `block (2 levels) in replace_gem': sqlite3 is not part of the bundle. Add it to your Gemfile. (Gem::LoadError) 102: from /app/bin/rails:9:in `<main>' /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/rubygems_integration.rb:406: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)
gem
1source 'https://rubygems.org' 2 3gem 'rails', '~> 5.2.3' 4gem 'bootstrap-sass', '3.3.7' 5gem 'bcrypt', '3.1.11' 6gem 'bootsnap', '>= 1.1.0', require: false 7 8 9 10gem 'puma', '3.9.1' 11gem 'sass-rails', '5.0.6' 12gem 'uglifier', '3.2.0' 13gem 'coffee-rails', '4.2.2' 14gem 'jquery-rails', '4.3.1' 15gem 'turbolinks', '5.0.1' 16gem 'jbuilder', '2.7.0' 17 18group :development, :test do 19 gem 'sqlite3', '~> 1.3.6' 20 gem 'byebug', '9.0.6', platform: :mri 21end 22 23group :development do 24 gem 'web-console', '3.5.1' 25 gem 'listen', '3.0.8' 26 gem 'spring', '2.0.2' 27 gem 'spring-watcher-listen', '2.0.1' 28end 29 30group :test do 31 gem 'rails-controller-testing', '1.0.2' 32 gem 'minitest-reporters', '1.1.14' 33 gem 'guard', '2.13.0' 34 gem 'guard-minitest', '2.4.4' 35end 36 37group :production do 38 gem 'pg', '0.19.0' 39end 40 41# Windows環境ではtzinfo-dataというgemを含める必要があります 42gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
sqlite3に原因があると思うのですがgroup :development, :test doにしてるのでどうしたらいいのかわかりません。
試したことの一つとしてdatabeseを変えてみました。
config/databese.yml
1production: 2 <<: *default 3 adapter: postgresql 4 database: db/production.postgresql
回答1件
あなたの回答
tips
プレビュー