Bird
0
0

What is the purpose of the source line in a Gemfile?

easy📝 Conceptual Q1 of 15
Ruby - Gems and Bundler
What is the purpose of the source line in a Gemfile?
AIt runs the gem installation process automatically
BIt specifies where to find the gems to install
CIt lists all the gems already installed
DIt defines the Ruby version for the project
Step-by-Step Solution
Solution:
  1. Step 1: Understand the role of source in Gemfile

    The source line tells Bundler where to look for gems, usually a URL like https://rubygems.org.
  2. Step 2: Compare options with this role

    Only It specifies where to find the gems to install correctly describes this purpose. Other options describe unrelated tasks.
  3. Final Answer:

    It specifies where to find the gems to install -> Option B
  4. Quick Check:

    Gemfile source = Specifies gem location [OK]
Quick Trick: Remember: source sets gem repository URL [OK]
Common Mistakes:
  • Confusing source with Ruby version setting
  • Thinking source runs gem installation
  • Assuming source lists installed gems

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes