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.
In the invoked popup, start typing bundler, select bundle install and press Enter . Select Tools | Bundler | Install from the main menu. Open the Gemfile, place the caret at any highlighted gem missing in the project SDK and press Alt+Enter . Select Install missing gems using 'bundler' and press Enter .
If you've installed into ./bundle/vendor or similar, you need to remove the gem first but explicitly specify the GEM_HOME, e.g. This is by far the simplest way to uninstall gems installed using bundler into a vendor directory. Ideally, there would be a command bundle uninstall or bundle reinstall , etc.
This command will remove all unused gems in your bundler directory. This is useful when you have made many changes to your gem dependencies.
Common Attempts To Resolve Ruby Gem Dependencies Bundler can help to resolve dependencies when working with Ruby gems by allowing you to specify a set of gems in a Gemfile, then issue a single command to install them. Bundler then automatically resolves the dependencies for you.
bundle install --redownload
See the reference for bundle install
: https://bundler.io/v2.2/man/bundle-install.1.html
or
bundle install --force
For older versions of bundler
Another way to deal with gem problems can be to sudo gem clean
instead of reinstalling everything
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With