Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rails 5.0.7 Multiple default gems and unable to uninstall any default gem

I had bundler 1.16 installed and rails was complaining that my bundle had previously been created with a higher version of bundler So I installed bundler 2.0.1 with the --default switch but that still left a default 1.16.6 as well I'm trying to uninstall 1.16.6 but I get error can't uninstall a default gem How can I remove it's default flag then? Also if I'm using rails 5.0.7 which ruby version should I use?

like image 793
stuckonrails Avatar asked Feb 03 '26 20:02

stuckonrails


1 Answers

I am not sure if this is the right way to do this, but, in my case, its how i got the issue fixed. So, just in-case this helps.

Initially:

gem list bundler

*** LOCAL GEMS ***

bundler (default: 2.0.2, default: 1.17.3, default: 1.16.6)
bundler-unload (1.0.2)
rubygems-bundler (1.4.5)

After failing multiple uninstalls, I ran this,

gem update --system

Then,

bundle version
Bundler version 1.17.3 (2019-08-16 commit d7089abb6)

(which is the version i required in my application)

gem list bundler

*** LOCAL GEMS ***

bundler (default: 1.17.3)
bundler-unload (1.0.2)
rubygems-bundler (1.4.5)
like image 176
MonR Avatar answered Feb 05 '26 13:02

MonR