LoginSignup
25
18

More than 5 years have passed since last update.

Rails Herokuにpushで詰まった話

Posted at

git push heroku masterで詰まった

今回は,Herokuにアップロードしようとした所で詰まったので記録しておきます。

$ git push heroku master
・
・
・
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !       Push rejected to tranquil-wave-48446.
remote: 
To https://git.heroku.com/tranquil-wave-48446.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to・・・以下略
remote: -----> Ruby app detected
remote: 
remote:  !
remote:  !     You must use Bundler 2 or greater with this lockfile.
remote:  !

実行した所複数のエラーが発生し、何が原因化を模索・・・

pgの指定がおかしいのか、gemfile.lock、bundlerのバージョンが問題なのか調べても中々解決策が見つからない、わからない

bundler バージョンが問題?

自分の環境とHeroku上の環境でbundlerのバージョンが異なることによるエラーが原因(?)の様でした。

以上の記事を参考にさせていただきました。

$ heroku buildpacks:set https://github.com/bundler/heroku-buildpack-bundler2

を実行の後、再びHerokuへPushした所無事にアップロードができました!!!

感想

問題解決後にエラーを再検索してみると、同じ様なエラーになった人の記事がチラホラとありました。

もっと早い段階で気がつくことはできなかったのだろうか?
調べ方に改善の余地があるのかもしれない

25
18
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
25
18