Ruby gem is a package manager for the Ruby programming language. Here are some gem handy commands on Mac or Linux.
- Install a package
$ sudo gem install rails
- Uninstall a package
$ sudo gem uninstall rails
- List installed packages
$ gem list
- Show contents of an installed package
$ gem contents rails
- List commands and get help for a command
$ gem help commands $ gem help list
- Search remote gems by regex
$ gem search sass
- Find the location of a library file you can require
$ gem which sass