質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.47%
Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Q&A

0回答

273閲覧

Herokuでデプロイできない

hrmyg

総合スコア0

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

0グッド

0クリップ

投稿2021/01/14 14:22

前提・実現したいこと

railsアプリケーションを作成しており、Herokuでデプロイしようとするとエラーが出ました。
エラーを解消し、デプロイできるようにしたいです。

発生している問題・エラーメッセージ

$ git push heroku master               <省略> 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.1.4 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Compiling Ruby/Rails remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-20/ruby-2.6.5.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3. remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-20/ruby-2.6.5.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3. remote: remote: ! remote: ! The Ruby version you are trying to install does not exist on this stack. remote: ! remote: ! You are trying to install ruby-2.6.5 on heroku-20. remote: ! remote: ! Ruby ruby-2.6.5 is present on the following stacks: remote: ! remote: ! - cedar-14 remote: ! - heroku-16 remote: ! - heroku-18 remote: ! remote: ! Heroku recommends you use the latest supported Ruby version listed here: remote: ! https://devcenter.heroku.com/articles/ruby-support#supported-runtimes remote: ! remote: ! For more information on syntax for declaring a Ruby version see: remote: ! https://devcenter.heroku.com/articles/ruby-versions 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: a63ec93e7648323a70388b9e8f3c43c88777f899 remote: ! remote: ! We have detected that you have triggered a build from source code with version a63ec93e7648323a70388b9e8f3c43c88777f899 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 cafe-log. remote: To https://git.heroku.com/cafe-log.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/cafe-log.git'

該当のソースコード

ソースコード

試したこと

$ heroku stack:set heroku-16
上記のコマンドを実行し再度、herokuへpushしました。

発生している問題・エラーメッセージ

git push heroku master            <省略> remote: -----> Building on the Heroku-16 stack 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: _ _ __ __ ______ ____ _ remote: | | | | /_ | / / | ____/ __ \| | remote: | |__ ___ _ __ ___ | | ___ _ ______| |/ /_ | |__ | | | | | remote: | '_ \ / _ \ '__/ _ \| |/ / | | |______| | '_ \ | __|| | | | | remote: | | | | __/ | | (_) | <| |_| | | | (_) | | |___| |__| | |____ remote: |_| |_|\___|_| \___/|_|\_\__,_| |_|\___/ |______\____/|______| remote: remote: This app is using the Heroku-16 stack, which is deprecated: remote: https://devcenter.heroku.com/changelog-items/1958 remote: remote: From May 1st 2021, Heroku-16 will be end-of-life, and apps using it remote: will no longer receive security updates, and be run at your own risk. remote: remote: From June 1st 2021, builds will no longer be allowed for Heroku-16 apps remote: remote: Please upgrade to a newer stack as soon as possible: remote: https://devcenter.heroku.com/articles/upgrading-to-the-latest-stack remote: https://help.heroku.com/0S5P41DC/heroku-16-end-of-life-faq remote: remote: ! remote: ! ## Warning - The same version of this code has already been built: a63ec93e7648323a70388b9e8f3c43c88777f899 remote: ! remote: ! We have detected that you have triggered a build from source code with version a63ec93e7648323a70388b9e8f3c43c88777f899 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... done. To https://git.heroku.com/cafe-log.git * [new branch] master -> master

このような状態になっており、対処方法がわかりません。
ご教授のほどよろしくお願いします。

補足情報(FW/ツールのバージョンなど)

ruby '2.6.5'
gem 'rails', '~> 6.0.0'
gem 'mysql2', '>= 0.4.4'

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.47%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問