Ruby Language Gems


Example

In this example we will use 'nokogiri' as an example gem. 'nokogiri' can later on be replaced by any other gem name.

To work with gems we use a command line tool called gem followed by an option like install or update and then names of the gems we want to install, but that is not all.

Install gems:

$> gem install nokogiri

But that is not the only thing we need. We can also specify version, source from which to install or search for gems. Lets start with some basic use cases (UC) and you can later on post request for an update.

Listing all the installed gems:

$> gem list

Uninstalling gems:

$> gem uninstall nokogiri

If we have more version of the nokogiri gem we will be prompted to specify which one we want to uninstall. We will get a list that is ordered and numbered and we just write the number.

Updating gems

$> gem update nokogiri

or if we want to update them all

$> gem update

Comman gem has many more usages and options to be explored. For more please turn to the official documentation. If something is not clear post a request and I will add it.