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

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

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

DjangoはPythonで書かれた、オープンソースウェブアプリケーションのフレームワークです。複雑なデータベースを扱うウェブサイトを開発する際に必要な労力を減らす為にデザインされました。

Heroku

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

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

0回答

253閲覧

Herokuをアップデートするとデプロイできなくなりました

mmk_1108

総合スコア0

Django

DjangoはPythonで書かれた、オープンソースウェブアプリケーションのフレームワークです。複雑なデータベースを扱うウェブサイトを開発する際に必要な労力を減らす為にデザインされました。

Heroku

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

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2022/12/06 08:43

Herokuでデプロイする際にエラーになります。

初めて質問させていただきます。
宜しくお願いし致します。

Djangoで作成したアプリケーションをHerokuにデプロイする際にエラーが出ます。
アップデートをする前ではデプロイできたにもかかわらず、22stackの更新をおこなってからデプロイをする事ができなくなりました。
初めて作るアプリケーションなので、最後までデプロイしたいと思っています。

環境
Windows11
Python3.10.8
Vscode

試したこと

  • buildpacksの更新
  • 推奨環境への変更(Python3.9.13→Python3.10.8)※runtime.txtの更新
  • requirements.txt の確認
  • heroku ecoDyno・PosgreSQLの有料プランへの加入

該当のソースコード

Enumerating objects: 173, done. Counting objects: 100% (173/173), done. Delta compression using up to 8 threads Compressing objects: 100% (162/162), done. Writing objects: 100% (173/173), 32.95 KiB | 992.00 KiB/s, done. Total 173 (delta 62), reused 0 (delta 0), pack-reused 0 remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-22 stack remote: -----> Using buildpack: heroku/python remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure remote: remote: ! Push failed remote: ! remote: ! ## Warning - The same version of this code has already been built: 3e05dc58063cf8b3efba4fe0c7abe218615d6516 remote: ! remote: ! We have detected that you have triggered a build from source code with version 3e05dc58063cf8b3efba4fe0c7abe218615d6516 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 testapp1114. remote: To https://git.heroku.com/testapp1114.git ! [remote rejected] main -> main (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/testapp1114.git'

ファイル構造

C:.
│ .gitattributes

└─myproject
│ .gitignore
│ db.sqlite3
│ manage.py
│ Procfile
│ requirements.txt
│ runtime.txt

├─myapp
│ │ admin.py
│ │ apps.py
│ │ form.py
│ │ models.py
│ │ tests.py
│ │ urls.py
│ │ views.py
│ │ init.py
│ │
│ ├─migrations
│ │ │ 0001_initial.py
│ │ │ init.py
│ │ │
│ │ └─__pycache__
│ │ 0001_initial.cpython-39.pyc
│ │ init.cpython-39.pyc
│ │
│ ├─templates
│ │ └─myapp
│ │ base.html
│ │ index.html
│ │ post_confirm_delete.html
│ │ post_detail.html
│ │ post_form.html
│ │
│ └─__pycache__
│ admin.cpython-39.pyc
│ apps.cpython-39.pyc
│ form.cpython-39.pyc
│ models.cpython-39.pyc
│ urls.cpython-39.pyc
│ views.cpython-39.pyc
init.cpython-39.pyc

├─myproject
│ │ asgi.py
│ │ local_settings.py
│ │ settings.py
│ │ urls.py
│ │ wsgi.py
│ │ init.py
│ │
│ └─__pycache__
│ settings.cpython-39.pyc
│ urls.cpython-39.pyc
│ wsgi.cpython-39.pyc
init.cpython-39.pyc

├─static
│ style.css

└─staticfiles

参考にしたURL

requirements.txt,runtime.txtの中身

txt

1asgiref==3.5.2 2certifi==2022.9.14 3dj-database-url==1.0.0 4django==4.1 5gunicorn==20.1.0 6sqlparse==0.4.1 7whitenoise==6.2.0 8wincertstore==0.2 9django-on-heroku==1.1.2

txt

1python-3.10.8

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

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

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

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

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

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

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

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

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

ただいまの回答率
85.47%

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

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

質問する

関連した質問