Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to uninstall bundler 1.17.3

My current bundler version appears to be 1.17.3. I actually need 1.17.2 for my latest work, but I am unable to uninstall 1.17.3.

If I run gem uninstall bundler the command exits with no output. The command gem info bundler always shows version 1.17.3.

$ gem uninstall bundler
$ gem info bundler

*** LOCAL GEMS ***
... yada yada yada ...
bundler (1.17.3)
    Installed at (default): /Users/disaacs/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0

If I install the bundler version I need, I get both versions installed, but the 1.17.3 version runs by default.

$ gem install bundler -v 1.17.2
Fetching bundler-1.17.2.gem
Successfully installed bundler-1.17.2
Parsing documentation for bundler-1.17.2
Installing ri documentation for bundler-1.17.2
Done installing documentation for bundler after 3 seconds
1 gem installed
$ gem info bundler

*** LOCAL GEMS ***
... yada yada yada ...    
bundler (1.17.3, 1.17.2)
    Installed at (1.17.3, default): /Users/disaacs/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0
                 (1.17.2): /Users/disaacs/.rvm/gems/ruby-2.5.3

    The best way to manage your application's dependencies
$ bundle --version
Bundler version 1.17.3

Any suggestions about how I can get rid of bundler 1.17.3?

My environment is a MacBook running 10.14.5 (Mojave), with ruby 2.5.3 installed via rvm.

$ rvm list
=* ruby-2.5.3 [ x86_64 ]

# => - current
# =* - current && default
#  * - default
like image 952
Dave Isaacs Avatar asked Jun 19 '19 12:06

Dave Isaacs


People also ask

How do I uninstall bundler?

Installation and usage To install a prerelease version (if one is available), run gem install bundler --pre . To uninstall Bundler, run gem uninstall bundler . See bundler.io for the full documentation.

How do I uninstall default bundler?

You have to delete the . gemspec file corresponding to the default gem you want to delete.

What is the latest version of bundler?

shows Bundler version 2.3. 21 (2022-08-24 commit d54be5fdd8) for example. cf. bundle --version shows Bundler version 2.3.

Is bundler part of Ruby?

Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed. Bundler is an exit from dependency hell, and ensures that the gems you need are present in development, staging, and production. Starting work on a project is as simple as bundle install .


1 Answers

In short, try navigate to a location except where your rails project is, and run gem uninstall bundler again.


MacOS 10.15.2, Ruby 2.6.5 and RubyGems 3.0.3

I was trying to uninstall bundler 2.1.4, and my default bundler is 1.17.2

$ gem list | grep "bundle"
bundler (2.1.4, default: 1.17.2)

And I tried

$ gem uninstall bundler -v 2.1.4
Gem 'bundler' is not installed

And also

$ gem uninstall bundler

just output nothing.

And finally I cd to another folder and run uninstall again and it worked.

like image 61
hungmi Avatar answered Sep 24 '22 07:09

hungmi