โ† Ruby Programming learning path
Ruby Programming ยท Module 9 of 10

Gems and Bundler

Gems are Ruby libraries; Bundler manages them per project.

๐Ÿ“– Key ideas

  1. gem install name installs a library globally.
  2. A Gemfile lists the gems a project needs.
  3. bundle install installs them and writes Gemfile.lock.
  4. Gemfile.lock pins exact versions so every machine matches.
  5. rubygems.org hosts the public gems.
๐Ÿ’ก Real-life example: Like a shopping list for a recipe: the Gemfile lists ingredients, and the lock file records the exact brands you bought.
GemA packaged Ruby library
GemfileList of a project's gems
Gemfile.lockExact installed versions
BundlerTool that installs gems from the Gemfile