Bird
0
0

Which of the following commands correctly sets the global Ruby version to 3.1.2 using rbenv?

easy📝 Syntax Q12 of 15
Ruby - Ecosystem and Best Practices
Which of the following commands correctly sets the global Ruby version to 3.1.2 using rbenv?
Arbenv global 3.1.2
Brbenv use 3.1.2
Crbenv set 3.1.2
Drbenv switch 3.1.2
Step-by-Step Solution
Solution:
  1. Step 1: Recall rbenv commands

    The command to set the global Ruby version in rbenv is rbenv global <version>.
  2. Step 2: Match the correct command

    Among the options, only rbenv global 3.1.2 correctly sets the global version.
  3. Final Answer:

    rbenv global 3.1.2 -> Option A
  4. Quick Check:

    Set global version = rbenv global [OK]
Quick Trick: Use 'rbenv global' to set Ruby version globally [OK]
Common Mistakes:
  • Using 'rbenv use' which is invalid
  • Confusing 'set' or 'switch' commands
  • Not specifying the version number

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes