1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

heroku/デプロイ/エラー原因/bundler

Last updated at Posted at 2021-02-11

herokuにデプロイする際に苦しんだ。
エラーは以下の通り

remote:  !
remote:  !     Could not detect rake tasks
remote:  !     ensure you can run `$ bundle exec rake -P` against your app
remote:  !     and using the production group of your Gemfile.
remote:  !     /tmp/build_0d17b8ad/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)
remote:  !     from /tmp/build_0d17b8ad/config/boot.rb:4:in `<top (required)>'
remote:  !     from /tmp/build_0d17b8ad/bin/rake:3:in `require_relative'
remote:  !     from /tmp/build_0d17b8ad/bin/rake:3:in `<main>'
remote:  !

色々調べた結果以下の記事を知る
(https://qiita.com/i05tream/items/8b64d6061a3589e5d242)

どうやらbundlerのバージョンがherokuに対応してなかったらしい
bundlerを2.1.4に変更する

$ rm Gemfile.lock 
$ gem install bundler -v 2.1.4
$ bundle _2.1.4_ install --without production

その後しっかりgitでcommitする
再度デプロイ

remote: Verifying deploy... done.

無事成功、長かった:cold_sweat:

1
0
0

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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?