Bird
0
0

What does the command gem install do in Ruby?

easy📝 Conceptual Q11 of 15
Ruby - Gems and Bundler
What does the command gem install do in Ruby?
AIt installs a Ruby gem (library) on your system.
BIt runs Ruby code inside the gem file.
CIt updates Ruby to the latest version.
DIt removes a gem from your system.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of gem install

    This command is used to add new Ruby libraries (called gems) to your system so you can use them in your programs.
  2. Step 2: Differentiate from other gem commands

    Running code, updating Ruby, or removing gems are done by other commands, not gem install.
  3. Final Answer:

    It installs a Ruby gem (library) on your system. -> Option A
  4. Quick Check:

    gem install = installs gem [OK]
Quick Trick: Remember: install adds gems, require uses them [OK]
Common Mistakes:
  • Confusing gem install with running Ruby code
  • Thinking gem install updates Ruby itself
  • Mixing up install with gem uninstall

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes