Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Uninstalling a Gem1:24 with Jason Seifer
It is equally as important to be able to remove a gem as it is to install one.
Sometimes you'll get into a scenario where a gem
needs to be removed from your Ruby installation.
This can be the entirety of the gem, or just a specific version.
Let's see how to uninstall a gem now using workspaces.
Equally as important as being able to install a gem
is being able to uninstall a gem.
So let's see how that works now.
If I list by different gems,
we can see that I have two different versions of money installed.
In order to uninstall a gem, we use the uninstall command, and
then the name of the gem that we want to uninstall.
In this case, it's going to be money.
After that, Ruby will give us the option to install a particular version, or
I'm going to uninstall the most recent version.
And then it shows us that it has successfully uninstalled that version.
I'm gonna clear my screen here, and install money again.
Now, if we do gem list, we can see we have both versions of money.
And if I wanted to uninstall a particular version.
I can pass in the version flag.
And that will uninstall the specified version of the gem.
You need to sign up for Treehouse in order to download course files.Sign up