herokuでデプロイしようとしたのですが、Failed to install gems via Bundlerと出ます。
色々調べ、bundlerのバージョンが合ってないのではと思い、バージョンを変更したりしましたが、ずっと同じエラーです。
Run bundle install
elsewhere and add the updated Gemfile.lock to version control.
とあるので、bundle installをし、updateもしました。
gitでコミット・プッシュできていないのではと思い、コミット・プッシュもしましたが、解決しません。
データベースはPostgreSQLに設定してあります。
アプリのurlを入力すると、Welcome to your new app!と表示さる状態です。
他に考えられる原因等あれば、ご教授ください。
git
1Enumerating objects: 781, done. 2Counting objects: 100% (781/781), done. 3Compressing objects: 100% (736/736), done. 4Writing objects: 100% (781/781), 17.00 MiB | 14.37 MiB/s, done. 5Total 781 (delta 429), reused 0 (delta 0) 6remote: Compressing source files... done. 7remote: Building source: 8remote: 9remote: -----> Building on the Heroku-18 stack 10remote: -----> Determining which buildpack to use for this app 11remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. 12remote: Detected buildpacks: Ruby,Node.js 13remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order 14remote: -----> Ruby app detected 15remote: -----> Installing bundler 1.17.3 16remote: -----> Removing BUNDLED WITH version in the Gemfile.lock 17remote: -----> Compiling Ruby/Rails 18remote: -----> Using Ruby version: ruby-2.5.3 19remote: -----> Installing dependencies using bundler 1.17.3 20remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 BUNDLE_GLOBAL_PATH_APPENDS_RUBY_SCOPE=1 bundle install -j4 21remote: You are trying to install in deployment mode after changing 22remote: your Gemfile. Run `bundle install` elsewhere and add the 23remote: updated Gemfile.lock to version control. 24remote: 25remote: If this is a development machine, remove the /tmp/build_18756f12/Gemfile freeze 26remote: by running `bundle install --no-deployment`. 27remote: 28remote: You have deleted from the Gemfile: 29remote: * pry-byebug 30remote: * pry-doc 31remote: * pry-rails 32remote: Bundler Output: You are trying to install in deployment mode after changing 33remote: your Gemfile. Run `bundle install` elsewhere and add the 34remote: updated Gemfile.lock to version control. 35remote: 36remote: If this is a development machine, remove the /tmp/build_18756f12/Gemfile freeze 37remote: by running `bundle install --no-deployment`. 38remote: 39remote: You have deleted from the Gemfile: 40remote: * pry-byebug 41remote: * pry-doc 42remote: * pry-rails 43remote: 44remote: ! 45remote: ! Failed to install gems via Bundler. 46remote: ! 47remote: ! Push rejected, failed to compile Ruby app. 48remote: 49remote: ! Push failed 50remote: ! 51remote: ! ## Warning - The same version of this code has already been built: 18d6a6f1ad11144a86a1686ddb07289219856d21 52remote: ! 53remote: ! We have detected that you have triggered a build from source code with version 18d6a6f1ad11144a86a1686ddb07289219856d21 54remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch. 55remote: ! 56remote: ! If you are developing on a branch and deploying via git you must run: 57remote: ! 58remote: ! git push heroku <branchname>:main 59remote: ! 60remote: ! This article goes into details on the behavior: 61remote: ! https://devcenter.heroku.com/articles/duplicate-build-version 62remote: 63remote: Verifying deploy... 64remote: 65remote: ! Push rejected to fingout. 66remote: 67 ! [remote rejected] main -> main (pre-receive hook declined)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。