0
0
Rubyprogramming~10 mins

Ruby version management (rbenv, rvm) - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to check the current Ruby version using rbenv.

Ruby
system('rbenv [1]')
Drag options to blanks, or click blank then click option'
Ainstall
Bversion
Cglobal
Dlocal
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'install' instead of 'version' will try to install Ruby.
Using 'global' or 'local' changes the version but does not display it.
2fill in blank
medium

Complete the code to install Ruby version 3.1.2 using rvm.

Ruby
rvm [1] 3.1.2
Drag options to blanks, or click blank then click option'
Ainstall
Bremove
Clist
Duse
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'use' switches versions but does not install.
Using 'list' shows installed versions but does not install.
Using 'remove' deletes a version.
3fill in blank
hard

Fix the error in the command to set Ruby 2.7.4 as the global version using rbenv.

Ruby
rbenv [1] 2.7.4
Drag options to blanks, or click blank then click option'
Aglobal
Blocal
Cinstall
Dversion
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'install' tries to install Ruby instead of setting it.
Using 'local' sets version only for current directory.
Using 'version' shows the current version but does not set it.
4fill in blank
hard

Fill both blanks to list all installed Ruby versions and then switch to version 3.0.0 using rvm.

Ruby
rvm [1]
rvm [2] 3.0.0
Drag options to blanks, or click blank then click option'
Alist
Buse
Cinstall
Dremove
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'install' instead of 'list' to see versions.
Using 'remove' instead of 'use' to switch versions.
5fill in blank
hard

Fill all three blanks to create a .ruby-version file with Ruby 2.6.8 and then verify the version with rbenv.

Ruby
echo [1] > .ruby-version
rbenv [2]
rbenv [3]
Drag options to blanks, or click blank then click option'
A"2.6.8"
Bversion
Crehash
Dglobal
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the version string in echo.
Skipping 'rehash' after changing versions.
Using 'global' instead of 'version' to check current version.