Junior Track Roadmap

Bundler: semantic versioning

This course covers semantic versioning as Bundler applies it, using a Rails app's Gemfile and Gemfile.lock. It explains what MAJOR, MINOR and PATCH each promise, and why Rails adds a fourth segment for security releases. It checks the boundaries of the ~> constraint with Ruby's Gem::Requirement class and reads compound constraints from the lockfile. It also looks at Gemfile lines with no constraint and at how bundle update behaves with and without a gem name. Finally, it reproduces a version conflict between two gems in a scratch project.

What you'll learn

  • ✓What MAJOR, MINOR and PATCH mean in the semver spec, and how pre-release versions rank
  • ✓Where the ~> constraint sets its ceiling with two segments and with three
  • ✓How compound constraints such as >= 1.6, < 2 work in a gemspec or Gemfile
  • ✓How Bundler treats Gemfile lines with no version string
  • ✓The difference between bundle update --all, bundle update GEM_NAME and options like --conservative
  • ✓How to read a Bundler resolver failure and fix the conflicting constraint
Free preview · Lesson 1 3 min read

What Bundler & Gemfile left for this course

The closing lesson of "Bundler & Gemfile", "Putting it together: from Gemfile to running app", says what that course chose not to teach:

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...