Bird
0
0

Identify the error in this Gemfile snippet:

medium📝 Debug Q14 of 15
Ruby - Gems and Bundler
Identify the error in this Gemfile snippet:
source 'https://rubygems.org'
gem 'rails', '6.1.4'
gem 'pg', '~> 1.2.3'
gem 'puma' '5.0'
AMissing comma between gem name and version in last line
BIncorrect source URL
CVersion numbers are invalid
DGem 'pg' version specifier is wrong
Step-by-Step Solution
Solution:
  1. Step 1: Check syntax of each gem line

    Each gem line should have a comma between gem name and version string.
  2. Step 2: Locate the error

    Last line has gem 'puma' '5.0' missing a comma between 'puma' and '5.0'.
  3. Final Answer:

    Missing comma between gem name and version in last line -> Option A
  4. Quick Check:

    Gemfile gem syntax requires comma [OK]
Quick Trick: Check commas between gem name and version [OK]
Common Mistakes:
  • Omitting commas between gem name and version
  • Assuming source URL is incorrect
  • Misreading version specifiers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes