Gem

Edit this Page

A gem is useful Ruby code packaged up for you to use. They allow us to be more productive by providing solutions for common use cases.

Ruby gems are installed with the gem command, or using bundler

Ruby applications use a Gemfile to declare their dependencies (which gems are required to run the application.) Ruby libraries declare their gem dependencies in the a gemspec

Writing your own gem is a great way to learn how to write re-usable software as well as contributing back to the Ruby community.