Ruby on Railsで作成したアプリをHerokuへデプロイしようとgit push heroku masterでプッシュしたところ、以下のようなエラーメッセージが出ました。
Enumerating objects: 7025, done. Counting objects: 100% (7025/7025), done. Delta compression using up to 4 threads Compressing objects: 100% (5579/5579), done. Writing objects: 100% (7025/7025), 41.10 MiB | 139.00 KiB/s, done. Total 7025 (delta 1053), reused 6948 (delta 1021), pack-reused 0 remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-20 stack remote: -----> Determining which buildpack to use for this app remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. remote: Detected buildpacks: Ruby,Node.js remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order remote: -----> Ruby app detected remote: -----> Installing bundler 2.2.16 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.7.3 remote: -----> Installing dependencies using bundler 2.2.16 remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4 remote: Your bundle only supports platforms ["x86_64-darwin-20"] but your local platform remote: is x86_64-linux. Add the current platform to the lockfile with `bundle lock remote: --add-platform x86_64-linux` and try again. remote: Bundler Output: Your bundle only supports platforms ["x86_64-darwin-20"] but your local platform remote: is x86_64-linux. Add the current platform to the lockfile with `bundle lock remote: --add-platform x86_64-linux` and try again. 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: 0a0d0048a917a8faec8181fc705bc3df74c7d6a8 remote: ! remote: ! We have detected that you have triggered a build from source code with version 0a0d0048a917a8faec8181fc705bc3df74c7d6a8 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 heroku-deploy-usedyoyo-app. remote: To https://git.heroku.com/heroku-deploy-usedyoyo-app.git ! [remote rejected] master -> main (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/heroku-deploy-usedyoyo-app.git'
調べたところ、bundlerのバージョンを疑った方がいいとのことで、herokuとbundlerのバージョンを一致させました。
RubyもHeroku-20に対応するものにバージョンアップさせています。
(Ruby 2.7.3)
(bundler 2.2.16)
しかし、何度も同じエラーが表示されてしまいます。
どうかご教授くださいますよう、よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。