git push heroku masterでエラーが起こり、成功しません。
オリジナルアプリを作成し、本番環境へデプロイしようとし、「git push heroku master」をしたのでが、エラーが起こり、できません。色々調べたのですが、本当にわからず、
・何が原因か
・どのようにすればこのエラーが解決できるか
が全くわかりません。
教えていただけると幸いです。
ターミナルのエラー
Bundler version 2.1.4 yukahayuusatoru@TokonamugonoAir b_blog % git push heroku master Enumerating objects: 64, done. Counting objects: 100% (64/64), done. Delta compression using up to 8 threads Compressing objects: 100% (50/50), done. Writing objects: 100% (51/51), 5.51 KiB | 1.10 MiB/s, done. Total 51 (delta 35), reused 0 (delta 0), pack-reused 0 remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-18 stack remote: -----> Using buildpack: heroku/ruby remote: -----> Ruby app detected remote: -----> Installing bundler 2.2.21 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.6.5 remote: -----> Installing dependencies using bundler 2.2.21 remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4 remote: Unable to find a spec satisfying -listen (~> 4.0.0) in the set. Perhaps the remote: lockfile is corrupted? remote: Bundler Output: Unable to find a spec satisfying -listen (~> 4.0.0) in the set. Perhaps the remote: lockfile is corrupted? remote: remote: ! remote: ! Failed to install gems via Bundler. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: ! remote: ! ## Warning - The same version of this code has already been built: 278573df2e29d306e5603b6427f69226b8737a5a remote: ! remote: ! We have detected that you have triggered a build from source code with version 278573df2e29d306e5603b6427f69226b8737a5a remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch. remote: ! remote: ! If you are developing on a branch and deploying via git you must run: remote: ! remote: ! git push heroku <branchname>:main remote: ! remote: ! This article goes into details on the behavior: remote: ! https://devcenter.heroku.com/articles/duplicate-build-version remote: remote: Verifying deploy... remote: remote: ! Push rejected to b-blog-36388. remote: To https://git.heroku.com/b-blog-36388.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/b-blog-36388.git'
heroku logsのメッセージ
2021-08-27T02:16:55.474328+00:00 heroku[web.1]: Idling 2021-08-27T02:16:55.484441+00:00 heroku[web.1]: State changed from up to down 2021-08-27T02:16:56.512053+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2021-08-27T02:16:56.673025+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish 2021-08-27T02:16:56.673485+00:00 app[web.1]: === puma shutdown: 2021-08-27 02:16:56 +0000 === 2021-08-27T02:16:56.673488+00:00 app[web.1]: - Goodbye! 2021-08-27T02:16:56.673560+00:00 app[web.1]: Exiting 2021-08-27T02:16:56.774015+00:00 heroku[web.1]: Process exited with status 143 2021-08-27T08:07:41.317770+00:00 app[api]: Starting process with command `rails db:migrate` by user 2021-08-27T08:07:50.738703+00:00 heroku[run.5863]: State changed from starting to up 2021-08-27T08:07:50.820181+00:00 heroku[run.5863]: Awaiting client 2021-08-27T08:07:50.845681+00:00 heroku[run.5863]: Starting process with command `rails db:migrate` 2021-08-27T08:07:59.585295+00:00 heroku[run.5863]: Process exited with status 0 2021-08-27T08:07:59.647410+00:00 heroku[run.5863]: State changed from up to complete 2021-08-27T08:08:06.000000+00:00 app[api]: Build started by user 2021-08-27T08:08:51.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f3d6a5f1-8229-48f1-8788-72ec530c70f4/activity/builds/ae295877-7fe3-4afe-8da2-2a37702f33b0 2021-08-27T08:09:33.000000+00:00 app[api]: Build started by user 2021-08-27T08:10:17.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f3d6a5f1-8229-48f1-8788-72ec530c70f4/activity/builds/70cd4745-70d2-4419-9899-40887d3ea3b1 2021-08-27T08:13:28.970773+00:00 app[api]: Starting process with command `rails db:migrate` by user 2021-08-27T08:13:35.224456+00:00 heroku[run.9794]: Awaiting client 2021-08-27T08:13:35.244761+00:00 heroku[run.9794]: Starting process with command `rails db:migrate` 2021-08-27T08:13:35.370656+00:00 heroku[run.9794]: State changed from starting to up 2021-08-27T08:13:43.753918+00:00 heroku[run.9794]: Process exited with status 0 2021-08-27T08:13:43.926963+00:00 heroku[run.9794]: State changed from up to complete 2021-08-27T08:13:50.000000+00:00 app[api]: Build started by user 2021-08-27T08:14:39.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f3d6a5f1-8229-48f1-8788-72ec530c70f4/activity/builds/8e57cc65-f0f4-43ad-b68c-ea0b56ffb1bf 2021-08-27T08:49:08.000000+00:00 app[api]: Build started by user 2021-08-27T08:49:55.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f3d6a5f1-8229-48f1-8788-72ec530c70f4/activity/builds/748538c9-0141-489c-94bc-b3344f646e4e 2021-08-27T08:50:42.000000+00:00 app[api]: Build started by user 2021-08-27T08:51:26.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f3d6a5f1-8229-48f1-8788-72ec530c70f4/activity/builds/9770a9f7-5406-40fc-9094-9941b0f1a517 2021-08-27T08:53:14.000000+00:00 app[api]: Build started by user 2021-08-27T08:53:59.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f3d6a5f1-8229-48f1-8788-72ec530c70f4/activity/builds/75a6a65f-7055-4b46-b77e-3948de11057a 2021-08-27T08:55:25.000000+00:00 app[api]: Build started by user 2021-08-27T08:56:13.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f3d6a5f1-8229-48f1-8788-72ec530c70f4/activity/builds/02f3eeb1-4789-4649-9b11-4f9aab999788 2021-08-27T09:05:33.000000+00:00 app[api]: Build started by user 2021-08-27T09:06:18.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f3d6a5f1-8229-48f1-8788-72ec530c70f4/activity/builds/ae97f36d-f5e8-4df8-8a72-c22310c08429 2021-08-27T09:07:29.000000+00:00 app[api]: Build started by user 2021-08-27T09:08:19.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f3d6a5f1-8229-48f1-8788-72ec530c70f4/activity/builds/e78cffd9-a449-4bdd-85ef-1fc1302cea80 2021-08-27T09:33:13.000000+00:00 app[api]: Build started by user 2021-08-27T09:34:06.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f3d6a5f1-8229-48f1-8788-72ec530c70f4/activity/builds/967e5fe7-34e8-459a-81e9-3a20562d2c9b 2021-08-27T09:41:35.000000+00:00 app[api]: Build started by user 2021-08-27T09:41:41.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f3d6a5f1-8229-48f1-8788-72ec530c70f4/activity/builds/c50eeddd-c019-498a-b9b3-25f3884220bc 2021-08-27T09:54:37.000000+00:00 app[api]: Build started by user 2021-08-27T09:54:42.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f3d6a5f1-8229-48f1-8788-72ec530c70f4/activity/builds/fb8fa6fb-5876-4bb9-8ce3-bf07f7194319 2021-08-27T09:59:36.000000+00:00 app[api]: Build started by user 2021-08-27T09:59:42.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/f3d6a5f1-8229-48f1-8788-72ec530c70f4/activity/builds/c2c47823-d65c-4ae9-a2f7-6c976fe88293
メールアドレスが表示されていた部分は消しています。
試したこと
調べたら「リモートリポジトリとローカリリポジトリのバージョン?あっていない」のようなサイトもあったのですが、多分そこが間違いではないとも思うのですが、原因が本当にわかりません。
補足情報(FW/ツールのバージョンなど)
Bundler version 2.1.4
少しコードが長いですが、エラーを解決していただけると幸いです。
回答2件
あなたの回答
tips
プレビュー