This module envelops all the needs of the users for working with GEM. It covers various features, and in hand promotes various functions to be performed.
RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries (in a self-contained format called a “gem”), a tool designed to easily manage the installation of gems, and a server for distributing them.
Let us see the various features and how to use this module from the upcoming topics.
The help command instructs the users about the purpose and various features, and the syntax for implementing those various features. It also lists outs the alternative parameters that can be used in declarations. The syntax format for applying help option under this module, is given below,
ptconfigure gem help
The following screenshot visualize the output and working of help option under this module.
kevell@corp:/# ptconfigure gem help
******************************
This command allows you to modify create or modify gems
Gem, gem
- install
Install
example: ptconfigure gem pkg-install --package-name="somename"
- remove
Remove
example: ptconfigure gem pkg-remove --package-name="somename"
- ensure
Ensure
example: ptconfigure gem pkg-ensure --package-name="somename"
- update
Update
example: ptconfigure gem update
------------------------------
End Help
******************************
As depicted from the above help command, the various features of Gem is listed as below,
Let us see in detail about these features.
This function allows you to install the package that the user needs. The following screenshot visualize the output,
kevell@corp:/# ptconfigure gem pkg-install --package-name=cucumber
Successfully installed cucumber-2.0.0
1 gem installed
Installing ri documentation for cucumber-2.0.0...
Installing RDoc documentation for cucumber-2.0.0...
******************************
Gem Modifications:
--------------------------------------------
Gem: Success
------------------------------
Gem Mods Finished
******************************
This functions aims at removing an existing gem. This function of gem using this module can be achieved by the following syntax,
ptconfigure gem remove --gemname="somename"
In the place of gemname the user can specify the name of the gem which is to be deleted. After entering the command as specified above, the specified gem will be deleted.
kevell@corp:/# ptconfigure gem pkg-remove --package-name=cucumber
Removing cucumber
Successfully uninstalled cucumber-2.0.0
******************************
Gem Modifications:
--------------------------------------------
Gem: Failure
------------------------------
Gem Mods Finished
******************************
This functions ensures the package is installed correctly in the machine.
ptconfigure gem pkg-ensure --package="ssh"
kevell@corp:/# ptconfigure gem pkg-ensure
Enter Package:
cucumber
true
[Pharaoh Logging] Package cucumber from the Packager Gem is Installed
******************************
Gem Modifications:
--------------------------------------------
Gem: Success
------------------------------
Gem Mods Finished
******************************
kevell@corp:/# ptconfigure gem pkg-ensure
Enter Package:
cucumber
false
[Pharaoh Logging] Package cucumber from the Packager Gem is not Installed
******************************
Gem Modifications:
--------------------------------------------
Gem: Success
------------------------------
Gem Mods Finished
******************************
The alternative parameters for this module, either of which can be used in declaration is,