Bird
0
0

You run rbenv local 3.0.0 but ruby -v still shows Ruby 2.7.0. What is the most likely problem?

medium📝 Debug Q6 of 15
Ruby - Ecosystem and Best Practices
You run rbenv local 3.0.0 but ruby -v still shows Ruby 2.7.0. What is the most likely problem?
AYou forgot to run <code>rbenv rehash</code> after setting local version
BYour shell environment is not configured to use rbenv
CThe <code>.ruby-version</code> file is missing or incorrect
DRuby 3.0.0 is not installed
Step-by-Step Solution
Solution:
  1. Step 1: Check rbenv environment setup

    If ruby -v does not reflect the local version, the shell might not be using rbenv's shims.
  2. Step 2: Confirm shell configuration

    Without proper PATH and initialization, rbenv cannot override Ruby version, so the system Ruby remains active.
  3. Final Answer:

    Your shell environment is not configured to use rbenv -> Option B
  4. Quick Check:

    Shell config missing = rbenv version ignored [OK]
Quick Trick: Ensure rbenv is initialized in shell to activate versions [OK]
Common Mistakes:
  • Assuming rbenv rehash fixes version switching
  • Not verifying if Ruby 3.0.0 is installed
  • Ignoring shell PATH and initialization setup

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes