How do I force Bundler to reinstall all of my gems?

Kevin picture Kevin · Jul 24, 2017 · Viewed 35.8k times · Source

How do I force Bundler to reinstall all of the gems in my gemfile? Or, how do I force Bundler to uninstall all of the gems it installed so I can then reinstall them myself?


I saw rails bundle clean, but this question explains how to remove gems that bundle installed but are no longer in the gemfile.

And How to reinstall a gem using bundler explains how to reinstall a single gem. I would like to reinstall all of my gems at once.

Answer

Kevin picture Kevin · Jul 24, 2017
bundle install --force

See the reference for bundle install: https://bundler.io/v2.0/man/bundle-install.1.html

or

bundle install --redownload

In newer versions of bundler