This course will be retired on June 1, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
It is equally as important to be able to remove a gem as it is to install one.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Sometimes you'll get into
a scenario where a gem
0:00
needs to be removed from
your Ruby installation.
0:03
This can be the entirety of the gem,
or just a specific version.
0:06
Let's see how to uninstall
a gem now using workspaces.
0:11
Equally as important as
being able to install a gem
0:16
is being able to uninstall a gem.
0:18
So let's see how that works now.
0:21
If I list by different gems,
0:24
we can see that I have two different
versions of money installed.
0:26
In order to uninstall a gem,
we use the uninstall command, and
0:30
then the name of the gem
that we want to uninstall.
0:35
In this case, it's going to be money.
0:38
After that, Ruby will give us the option
to uninstall a particular version, or
0:42
all versions.
0:46
I'm going to uninstall
the most recent version.
0:48
And then it shows us that it has
successfully uninstalled that version.
0:52
I'm gonna clear my screen here,
and install money again.
0:56
Okay.
1:03
Now, if we do gem list,
we can see we have both versions of money.
1:04
And if I wanted to uninstall
a particular version.
1:09
I can pass in the version flag.
1:14
And that will uninstall
the specified version of the gem.
1:19
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up