[ACCEPTED]-Rails: Uninstall specific version of a library using gem-rubygems

Accepted answer
Score: 92

When you do gem uninstall capybara it should give you a menu asking 3 which one you want to uninstall.

Alternatively 2 use the -v option.

gem uninstall capybara -v 1.1.4

Note you may need to sudo 1 these commands if you're not using rvm.

Score: 1

You can also uninstall gems with version 5 requirements using this format:

gem uninstall 'my_gem:1.0.0'

So you in 4 your case, you would have:

gem uninstall 'capybara:1.1.4'

This also works 3 when you want to uninstall multiple gems:

gem uninstall 'my_gem:1.0.0' 'my_other_gem:2.0.0'


gem uninstall 'my_gem:1.0.0' 'my_other_gem:~>2.0.0'

So 2 you in your case, you would have:

gem uninstall 'capybara:1.1.4' 'capybara:2.1.40'

That's 1 all.

I hope this helps

More Related questions