Railsチュートリアルの1.5.2章
エラーメッセージ
❯ git push heroku master
Enumerating objects: 94, done.
Counting objects: 100% (94/94), done.
Delta compression using up to 4 threads.
Compressing objects: 100% (77/77), done.
Writing objects: 100% (94/94), 20.94 KiB | 765.00 KiB/s, done.
Total 94 (delta 6), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
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:
remote: !
remote: ! You must use Bundler 2 or greater with this lockfile.
remote: !
〜〜〜〜 省略 〜〜〜〜
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/アプリ名.git'
解決方法
❯ bundle version
Bundler version 2.0.1 (2019-01-04 commit d7ad2192f)
❯ gem uninstall bundler -v 2.0.1
Successfully uninstalled bundler-2.0.1
❯ rm -f Gemfile.lock
❯ bundle install
❯ git add Gemfile.lock
❯ git add commit
❯ git push
❯ git push heroku master # 成功