Forrest logo
back to the rbenv tool

rbenv:tldr:6ac53

rbenv: Use a specific Ruby version across the whole system.
$ rbenv global ${version}
try on your machine

The rbenv global ${version} command is used to set the global Ruby version in a Ruby environment managed by rbenv.

Rbenv is a Ruby version management tool that allows you to switch between different versions of Ruby on your development machine. It enables you to have multiple Ruby versions installed on your system and select the one you want to use for a specific project or as the default system-wide version.

The command rbenv global ${version} sets the specified ${version} as the global version of Ruby. The ${version} parameter should be the desired Ruby version that you want to set as the default in your environment.

When you set a global Ruby version, it means that this version will be used as the default version whenever a Ruby command is executed from the command line or terminal. This can be convenient if you want to ensure that a specific version of Ruby is used consistently across all your projects.

It's worth noting that rbenv allows you to set both a global version and a project-specific version. The project-specific version takes precedence over the global version, so if you have set a Ruby version specifically for a project, that version will be used instead.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the rbenv tool