Guides

Getting Started

Guides

Dependency Management

Gem Development

Publishing & Security

Integrations

Hosting & Sources

Extending

Troubleshooting

Concepts

Reference

Appendix

Everything about library management in Ruby: learn what gems are, how to use them in your projects, and how to build and publish your own.

Ruby libraries are packaged and distributed as gems. Two tools that ship with Ruby manage them: RubyGems installs individual gems and provides the gem command, and Bundler tracks the exact set of gems an application depends on through a Gemfile. RubyGems.org is the community hosting service where gems are published and downloaded.

# Install a gem and use it right away
gem install nokogiri

# Track dependencies for a project
bundle init
bundle add rack

Getting Started

New to gems? Follow the tutorial from installing your first gem to publishing your own.

Concepts

How library management in Ruby works under the hood.