前提・実現したいこと
ここに質問の内容を詳しく書いてください。
Djangoで簡易的なブログを作っています。(djangogirlsを参考に)
デプロイをする際に、コマンドプロンプト上に以下のエラーメッセージが発生しました。
発生している問題・エラーメッセージ
C:\Users\marus\djangogirls>git push heroku master Enumerating objects: 22, done. Counting objects: 100% (22/22), done. Delta compression using up to 4 threads. Compressing objects: 100% (18/18), done. Writing objects: 100% (22/22), 4.77 KiB | 407.00 KiB/s, done. Total 22 (delta 0), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: 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: Verifying deploy... remote: remote: ! Push rejected to kazuvinharris. remote: To https://git.heroku.com/kazuvinharris.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/kazuvinharris.git'
該当のソースコード
試したこと
ここに問題に対して試したことを記載してください。
1回目にgit push heroku masterを行ったときに
C:\Users\marus\djangogirls>git push heroku master Enumerating objects: 22, done. Counting objects: 100% (22/22), done. Delta compression using up to 4 threads. Compressing objects: 100% (18/18), done. Writing objects: 100% (22/22), 4.77 KiB | 444.00 KiB/s, done. Total 22 (delta 0), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: ! No default language could be detected for this app. remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically. remote: See https://devcenter.heroku.com/articles/buildpacks remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to kazuvinharris. remote: To https://git.heroku.com/kazuvinharris.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/kazuvinharris.git'
と出たので、13行目のSeeのリンク先を参考にheroku buildpacks:set heroku/pythonをコンソールしました。
そしてそれを踏まえて、2回目のgit push heroku masterを行いました。
C:\Users\marus\djangogirls>heroku buildpacks:set heroku/python Buildpack set. Next release on kazuvinharris will use heroku/python. Run git push heroku master to create a new release using this buildpack. C:\Users\marus\djangogirls>git push heroku master Enumerating objects: 22, done. Counting objects: 100% (22/22), done. Delta compression using up to 4 threads. Compressing objects: 100% (18/18), done. Writing objects: 100% (22/22), 4.77 KiB | 444.00 KiB/s, done. Total 22 (delta 0), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: 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: Verifying deploy... remote: remote: ! Push rejected to kazuvinharris. remote: To https://git.heroku.com/kazuvinharris.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/kazuvinharris.git'
とこのようにまたしてもデプロイができなかったので、More info先にあったリンク(https://devcenter.heroku.com/articles/buildpacks#detection-failure)を参考に、一度Herokuのアプリケーションを消した後、同じ名前のアプリを作成後
heroku create kazuvinharris --buildpack heroku/pythonとコンソールしました。そして3回目のgit push heroku masterを行いました。
C:\Users\marus\djangogirls>git push heroku master Enumerating objects: 22, done. Counting objects: 100% (22/22), done. Delta compression using up to 4 threads. Compressing objects: 100% (18/18), done. Writing objects: 100% (22/22), 4.77 KiB | 407.00 KiB/s, done. Total 22 (delta 0), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: 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: Verifying deploy... remote: remote: ! Push rejected to kazuvinharris. remote: To https://git.heroku.com/kazuvinharris.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/kazuvinharris.git'
とこのように表示され煮詰まったので質問させていただきました。
補足情報(FW/ツールのバージョンなど)
使用のコードエディタ:Visual Studio Code
Python-3.6.6.
Django 1.11
ここにより詳細な情報を記載してください。
言語が検出されていないことがエラーの原因であると思っています。
心当たりとしては、コードエディタを使用する際、.vscodeファイルが作成され、その言語がjsonであったことです。
ファイルとgit logとgit statusの内訳です。
![
回答1件
あなたの回答
tips
プレビュー