前提・実現したいこと
Ruby on RailsでRailsTutorialをやっています
第1章でHerokuにデプロイして本番環境を試したときに、heroku openして開くとApplication Errorと表示されました。そこで、heroku run rails console,heroku,logsを試してみましたが、原因がわかりませんでした。
発生している問題・エラーメッセージ
- heroku run rails console
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError) from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /app/bin/spring:8:in `<top (required)>' from /app/bin/rails:3:in `load' from /app/bin/rails:3:in `<main>'
- heroku run rails | grep error
2018-06-29T02:05:31.707351+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fathomless-garden-32968.herokuapp.com request_id= da60f834-0bff-41f9-a3d4-9cacccd0a129 fwd="116.220.124.231" dyno= connect= service= status=503 bytes= protocol=https 2018-06-29T02:05:32.213905+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fathomless-garden-32968.herokuapp.com request_id=87c07087-88f2-47ea-b5e5-3206e570a053 fwd="116.220.124.231" dyno= conn ect= service= status=503 bytes= protocol=https 2018-06-29T02:06:34.793704+00:00 heroku[router]: at=error code=H10 desc="App cra shed" method=GET path="/" host=fathomless-garden-32968.herokuapp.com request_id= baf711ce-6389-45ab-9937-a250788a7cbd fwd="116.220.124.231" dyno= connect= servic e= status=503 bytes= protocol=https 2018-06-29T02:06:35.327492+00:00 heroku[router]: at=error code=H10 desc="App cra shed" method=GET path="/favicon.ico" host=fathomless-garden-32968.herokuapp.com request_id=1f3658ef-9758-450e-84fb-86ce697c41f9 fwd="116.220.124.231" dyno= conn ect= service= status=503 bytes= protocol=https 2018-06-29T03:08:19.312761+00:00 heroku[router]: at=error code=H10 desc="App cra shed" method=GET path="/" host=fathomless-garden-32968.herokuapp.com request_id= 7078eb8d-f694-4e2a-a0a5-1fc0a8515d6b fwd="116.220.124.231" dyno= connect= servic e= status=503 bytes= protocol=https 2018-06-29T03:08:19.779709+00:00 heroku[router]: at=error code=H10 desc="App cra shed" method=GET path="/favicon.ico" host=fathomless-garden-32968.herokuapp.com request_id=a4f094b5-fac8-48ef-9038-30b6384fbfc2 fwd="116.220.124.231" dyno= conn ect= service= status=503 bytes= protocol=https
また、以下のようなエラーも表示されました
2018-06-29T03:34:53.429503+00:00 heroku[web.1]: State changed from crashed to starting 2018-06-29T03:34:55.162269+00:00 heroku[web.1]: Starting process with command `npm start` 2018-06-29T03:34:56.987318+00:00 app[web.1]: npm ERR! missing script: start 2018-06-29T03:34:56.991188+00:00 app[web.1]: 2018-06-29T03:34:56.991383+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2018-06-29T03:34:56.991467+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-06-29T03_34_56_988Z-debug.log 2018-06-29T03:34:57.059172+00:00 heroku[web.1]: State changed from starting to crashed 2018-06-29T03:34:57.037367+00:00 heroku[web.1]: Process exited with status 1 2018-06-29T03:37:48.000000+00:00 app[api]: Build started by user sojusojuonetmrlarcbz@gmail.com 2018-06-29T03:37:59.809880+00:00 heroku[web.1]: State changed from crashed to starting 2018-06-29T03:38:01.725778+00:00 heroku[web.1]: Starting process with command `npm start` 2018-06-29T03:38:04.149796+00:00 heroku[web.1]: State changed from starting to crashed 2018-06-29T03:38:04.077253+00:00 app[web.1]: npm ERR! missing script: start 2018-06-29T03:38:04.083969+00:00 app[web.1]: 2018-06-29T03:38:04.084149+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2018-06-29T03:38:04.084233+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-0 6-29T03_38_04_079Z-debug.log 2018-06-29T03:38:04.137783+00:00 heroku[web.1]: Process exited with status 1
試したこと
bundle installは問題なくできましたが、問題解決には至りませんでした。また、rails s,rails cは問題なく動きます。package.jsonもいじろうとしましたが、jsの知識がなく、できませんでした。Gemfile.lockのbundler (=>1.3.0)という記述が気になりました。
補足情報(FW/ツールのバージョンなど)
Ruby : 2.5.1
Rails : 5.1.4
bundler : 1.16.2
あなたの回答
tips
プレビュー