Bird
0
0

Given the following commands run in order:

medium📝 Predict Output Q13 of 15
Ruby - Ecosystem and Best Practices
Given the following commands run in order:
rbenv install 3.0.0
rbenv local 3.0.0
ruby -v
What will be the output of ruby -v?
Aruby 2.7.0 (system default)
BCommand not found error
Cruby 3.0.0 (installed version)
Druby 3.1.0 (latest version)
Step-by-Step Solution
Solution:
  1. Step 1: Understand the commands

    rbenv install 3.0.0 installs Ruby 3.0.0. rbenv local 3.0.0 sets the Ruby version to 3.0.0 for the current directory.
  2. Step 2: Predict the ruby version output

    Running ruby -v in that directory will use Ruby 3.0.0, showing its version.
  3. Final Answer:

    ruby 3.0.0 (installed version) -> Option C
  4. Quick Check:

    Local version set to 3.0.0 means ruby -v shows 3.0.0 [OK]
Quick Trick: Local version overrides system Ruby version [OK]
Common Mistakes:
  • Assuming system default Ruby is used
  • Expecting latest Ruby version output
  • Thinking command will fail without global set

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes