herokuのデプロイでgit push heroku masterを入力するとFailed to install gems via Bundler.のところが赤字でエラーが出ます。
いろいろ調べたところbundlerのバージョンを変えないとダメとあったので、
bundlerのversionも2.2.16から2.1.14に変更しました。再度git push heroku masterを入力しても同じエラーが出ます。
またbundler -vと入力すると2.1.14なのですが、以下のコードでは、2.2.16で表示されているからなのでしょうか。(変更後のgit commit -mは入力済みです)
どうかご教授くださいますようお願いします。
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.6.6 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 Gemfile lists the gem pg (~> 1.1) more than once. remote: You should probably keep only one of them. remote: Remove any duplicate entries and specify the gem only once. remote: While it's not a problem now, it could cause errors if you change the version of one of them later. 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 Gemfile lists the gem pg (~> 1.1) more than once. remote: You should probably keep only one of them. remote: Remove any duplicate entries and specify the gem only once. remote: While it's not a problem now, it could cause errors if you change the version of one of them later. 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: 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: a1fc89a646344ed22db737d016232699342837ee remote: ! remote: ! We have detected that you have triggered a build from source code with version a1fc89a646344ed22db737d016232699342837ee 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 cafery. remote: To https://git.heroku.com/cafery.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/cafery.git'
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。