Bird
0
0

What file does Bundler use to track the exact versions of gems installed for a Ruby project?

easy📝 Conceptual Q1 of 15
Ruby - Gems and Bundler
What file does Bundler use to track the exact versions of gems installed for a Ruby project?
Abundle.lock
BGemfile.lock
CGemfile
Dgemspec
Step-by-Step Solution
Solution:
  1. Step 1: Understand Bundler's role in version tracking

    Bundler uses a special file to lock gem versions to ensure consistent installs.
  2. Step 2: Identify the file used for locking gem versions

    The file named Gemfile.lock records the exact gem versions installed.
  3. Final Answer:

    Gemfile.lock -> Option B
  4. Quick Check:

    Bundler lock file = Gemfile.lock [OK]
Quick Trick: Bundler locks versions in Gemfile.lock file [OK]
Common Mistakes:
  • Confusing Gemfile with Gemfile.lock
  • Thinking bundle.lock is the lock file
  • Assuming gemspec tracks installed gems

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes