前提・実現したいこと
プログラミング初心者・初投稿です。
herokuにデプロイしたい。
諸事情により、エラーを至急解決したいです!
よろしくお願いします!!
発生している問題・エラーメッセージ
! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/linebot-simpleapp.git'
該当のソースコード
python
1owner@MA4-0082 myapp % git push heroku master 2Enumerating objects: 92, done. 3Counting objects: 100% (92/92), done. 4Delta compression using up to 4 threads 5Compressing objects: 100% (75/75), done. 6Writing objects: 100% (92/92), 23.78 KiB | 1.98 MiB/s, done. 7Total 92 (delta 2), reused 0 (delta 0) 8remote: Compressing source files... done. 9remote: Building source: 10remote: 11remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz 12remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure 13remote: 14remote: ! Push failed 15remote: Verifying deploy... 16remote: 17remote: ! Push rejected to linebot-simpleapp. 18remote: 19To https://git.heroku.com/linebot-simpleapp.git 20 ! [remote rejected] master -> master (pre-receive hook declined) 21error: failed to push some refs to 'https://git.heroku.com/linebot-simpleapp.git'
指摘していただいたように、Buildpackの順番が間違っていました。
Rubyを1番目に設定するとエラーが解消しましたが、git push heroku master入力後に別のエラーが表示されました。
webpackerをインストールし、binフォルダも存在していますが、デプロイできなくて完全に詰まっています。
owner@MA4-0082 myapp % git push heroku master Enumerating objects: 92, done. Counting objects: 100% (92/92), done. Delta compression using up to 4 threads Compressing objects: 100% (75/75), done. Writing objects: 100% (92/92), 23.78 KiB | 1.49 MiB/s, done. Total 92 (delta 2), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Ruby app detected remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.5.1 remote: -----> Vendoring libpq 5.12.1 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Installing dependencies using bundler 2.0.2 省略 remote: I, [2020-01-24T08:00:33.476552 #1858] INFO -- : Writing /tmp/build_1d2ba40a5d4c9672da8ef3ad9a336f98/public/assets/manifest-cadda289ef9c70eaa0879a36e6263cb33f7523a16b3ef862e0b8609cdc2bdab1.js remote: I, [2020-01-24T08:00:33.476817 #1858] INFO -- : Writing /tmp/build_1d2ba40a5d4c9672da8ef3ad9a336f98/public/assets/manifest-cadda289ef9c70eaa0879a36e6263cb33f7523a16b3ef862e0b8609cdc2bdab1.js.gz remote: I, [2020-01-24T08:00:33.477028 #1858] INFO -- : Writing /tmp/build_1d2ba40a5d4c9672da8ef3ad9a336f98/public/assets/application-d0ff5974b6aa52cf562bea5921840c032a860a91a3512f7fe8f768f6bbe005f6.css remote: I, [2020-01-24T08:00:33.477207 #1858] INFO -- : Writing /tmp/build_1d2ba40a5d4c9672da8ef3ad9a336f98/public/assets/application-d0ff5974b6aa52cf562bea5921840c032a860a91a3512f7fe8f768f6bbe005f6.css.gz remote: webpack binstubs not found. remote: Have you run rails webpacker:install ? remote: Make sure the bin directory or binstubs are not included in .gitignore remote: Exiting! remote: remote: ! remote: ! Precompiling assets failed. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to linebot-simpleapp. remote: To https://git.heroku.com/linebot-simpleapp.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/linebot-simpleapp.git'
試したこと
いくつか関連サイトを参考に以下のことを実施しました。
・ bundle install --binstubs
・ bin/rails webpacker:binstubs
・ bin/webpack
・ bundle update --conservative webpacker
・ rails webpacker:install:react
・ npm install -g yarn
・ yarn init
・ nodebrew install-binary stable
・ nodebrew use v12.14.1
補足情報(FW/ツールのバージョンなど)
python -varsion=3.6.5
ruby -varsion=2.5.1
Homebrew -varsion=2.2.4
pyenv -varsion=1.2.16
node =v12.14.1
yarn =1.21.1
npm =6.13.4
回答1件
あなたの回答
tips
プレビュー