$ gem help query
Usage: gem query [options]
Options:
-i, --[no-]installed Check for installed gem
-I Equivalent to --no-installed
-v, --version VERSION Specify version of gem to query
for use with --installed
-n, --name-matches REGEXP Name of gem(s) to query on matches the
provided REGEXP