前提・実現したいこと
お世話になっております。
RubyonRailsで自習用のアプリを制作し終え、
herokuにあげるまでを行おうとしています。
下記URLを参考にherokuにあげようとしているのですが、
https://qiita.com/kazukimatsumoto/items/a0daa7281a3948701c39
herokuにデプロイの段階で
error: failed to push some refs to '作成したURL'
というエラー文が最後に出てうまく行きません。
同じエラー文の方がいるかと思い、下記URLも試してみましたが、エラー文は変わりませんでした。
https://qiita.com/ho_soft/items/90733a77c04539504206
最初にgit push heroku masterをしたら下記が表示されました。
エラー文は最終行に出ています。
Counting objects: 3, done. Writing objects: 100% (3/3), 234 bytes | 234.00 KiB/s, done. Total 3 (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/buildpack remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to アプリ名. remote: To https://git.heroku.com/アプリ名.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/アプリ名.git'
おそらく原因は、上記コード内にある、
App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/ruby.tgz remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
というコードだと思います。
https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/ruby.tgzで検索してみると、「Ruby」というフォルダがダウンロードされました。
中身は、
app.json Aptfile bin buildpack.toml CHANGELOG.md circle.yml config Gemfile Gemfile.lock hatchet.json hatchet.lock lib LICENSE Rakefile README.md support tmp vendor
が入っていますが、
何をどう使用するのかが分かりません。
以下 ご教示いただいた試したこと 追記ーーーーーー
ご教示いただいた、
https://qiita.com/arekore0/items/eae550bdbcc78eeac082
の方法で行なってみましたが、変わりなかったです。
こちらの方法で行なった場合ですが、
heroku buildpacks:set https://github.com/heroku/heroku-buildpack-ruby.git
を入力。すると下記がでます。
Buildpack set. Next release on アプリ名 will use https://github.com/heroku/heroku-buildpack-ruby.git. Run git push heroku master to create a new release using this buildpack. PC名:~ PCアカウント名$ heroku buildpacks:set heroku/ruby Buildpack set. Next release on アプリ名 will use heroku/ruby. Run git push heroku master to create a new release using this buildpack.
一応も下記も行いました。
heroku create --buildpack https://github.com/heroku/heroku-buildpack-ruby.git
すると、下記が出ました。
Creating app... done, ⬢ peaceful-anchorage-50354 Setting buildpack to https://github.com/heroku/heroku-buildpack-ruby.git... done https://peaceful-anchorage-50354.herokuapp.com/ | https://git.heroku.com/peaceful-anchorage-50354.git
その後、下記を行いましたが、変化ありませんでした。
git push heroku master