Recall & Review
beginner
What is the purpose of Ruby version managers like rbenv and rvm?
They help you install and switch between different Ruby versions easily on the same computer, so you can work on projects that need different Ruby versions without conflicts.
Click to reveal answer
intermediate
How does rbenv switch Ruby versions for your projects?
rbenv changes the Ruby version by adjusting your shell's PATH to point to the selected Ruby version's executables, letting you pick a global or project-specific Ruby version.
Click to reveal answer
beginner
What command do you use to install a new Ruby version with rvm?
You use
rvm install <version>, for example, rvm install 3.1.2 to install Ruby version 3.1.2.Click to reveal answer
intermediate
How can you set a Ruby version only for a specific project using rbenv?
Inside the project folder, run
rbenv local <version>. This creates a .ruby-version file that tells rbenv to use that Ruby version only when you are in that folder.Click to reveal answer
intermediate
What is a key difference between rbenv and rvm?
rvm is a full Ruby environment manager that can also manage gemsets, while rbenv focuses mainly on switching Ruby versions and relies on other tools for gem management.
Click to reveal answer
Which command installs Ruby version 3.0.0 using rbenv?
✗ Incorrect
rbenv uses 'rbenv install ' to install Ruby versions.
How do you switch the global Ruby version with rvm?
✗ Incorrect
With rvm, 'rvm use --default' sets the global Ruby version.
What file does rbenv create to remember the Ruby version for a project?
✗ Incorrect
rbenv creates a '.ruby-version' file in the project folder to set the local Ruby version.
Which Ruby version manager supports gemsets natively?
✗ Incorrect
rvm supports gemsets, which let you isolate gems per project.
If you want to try a new Ruby version temporarily with rbenv, which command do you use?
✗ Incorrect
'rbenv shell ' sets the Ruby version only for the current terminal session.
Explain how rbenv helps manage different Ruby versions on your computer.
Think about how your computer knows which Ruby to run.
You got /3 concepts.
Describe the main differences between rbenv and rvm and when you might choose one over the other.
Consider what extra features you need besides just switching Ruby versions.
You got /3 concepts.