RubyGems, the Ruby package manager, should be installed on your machine if you previously have installed Ruby. Verify this by running:
which gem
To update to its latest version with:
gem update --system
To install a gem (Ruby package), run:
gem install <gemname>
To install without generating the documentation for each gem (faster):
gem install <gemname> --no-document
gem list
To check if any installed gems are outdated:
gem outdated
To update all gems or a particular gem:
gem update [<gemname>]
RubyGems keeps old versions of gems, so feel free to do some cleaning after updating:
gem cleanup