Bird
0
0

You want to run a Ruby script server.rb with debugging enabled using the -r debug option. Which command is correct?

hard📝 Application Q9 of 15
Ruby - Basics and Runtime
You want to run a Ruby script server.rb with debugging enabled using the -r debug option. Which command is correct?
Aruby -r debug server.rb
Bruby server.rb -r debug
Cruby debug -r server.rb
Druby -debug server.rb
Step-by-Step Solution
Solution:
  1. Step 1: Understand Ruby command options

    The -r option loads a library before running the script.
  2. Step 2: Place options before the script filename

    The correct syntax is ruby -r debug server.rb to load debug before running.
  3. Final Answer:

    ruby -r debug server.rb -> Option A
  4. Quick Check:

    Options go before script filename [OK]
Quick Trick: Put options before script filename in ruby command [OK]
Common Mistakes:
MISTAKES
  • Placing options after filename
  • Mixing option order
  • Using non-existent -debug flag

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes