2
2

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 5 years have passed since last update.

RubyのバージョンアップをしたらHerokuにデプロイできなくなった

Last updated at Posted at 2019-06-22

tl;dr

個人でつくってるプロダクトで

ふと思い立って、Rubyのバージョンアップを行ったら

Herokuにデプロイできなくなった

それの解決方法というか、、

原因

Rubyのバージョンアップの際に、gem install bundler をして
Bundlerのバージョンが2.0.2 となったからっぽい

$ bundle -v
Bundler version 2.0.2
Gemfile.lock
BUNDLED WITH
   2.0.2

Bundlerを2.0.1で入れ直して、 Gemfile.lock もつくりなおす

$ gem uninstall bundler
$ gem install bundler -v 2.0.1

$ bundle -v  
Bundler version 2.0.1
$ rm Gemfile.lock
$ bundle --without production

これでできる

$ git push heroku master

おまけ

バージョンアップしたらRailsコマンドが叩けなくなった

rbenv: rails: command not found

The `rails' command exists in these Ruby versions:
$ rbenv exec gem install bundler

$ rbenv rehash

$ gem install rails 
2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?