gem — the RubyGems database

The gem check examines the local RubyGems database, and asserts that gems are installed or missing.


Check that a gem is installed:

gem = 'pry'

Check that a particular version is installed:

gem = 'bundler'
version = '1.17.2'

Check that a gem is not installed:

gem = 'rvm'
state = 'missing'

List of parameters

gemstringName of the Ruby gem.
statestringState of the gem. This can be 'present' or 'missing'.
versionstringIf installed, the version that should be present.