2018-06-14 18:08:50 +01:00
|
|
|
# rbenv
|
|
|
|
|
|
|
|
> A tool to easily install Ruby versions and manage application environments.
|
2024-01-09 09:04:06 +00:00
|
|
|
> See also: `asdf`.
|
2019-05-23 11:56:50 +01:00
|
|
|
> More information: <https://github.com/rbenv/rbenv>.
|
2018-06-14 18:08:50 +01:00
|
|
|
|
2021-01-04 18:01:41 +00:00
|
|
|
- Install a Ruby version:
|
2018-06-14 18:08:50 +01:00
|
|
|
|
2021-01-04 18:01:41 +00:00
|
|
|
`rbenv install {{version}}`
|
2018-06-14 18:08:50 +01:00
|
|
|
|
2021-01-04 18:01:41 +00:00
|
|
|
- Display a list of the latest stable versions for each Ruby:
|
|
|
|
|
|
|
|
`rbenv install --list`
|
|
|
|
|
|
|
|
- Display a list of installed Ruby versions:
|
2018-06-14 18:08:50 +01:00
|
|
|
|
|
|
|
`rbenv versions`
|
|
|
|
|
2021-01-04 18:01:41 +00:00
|
|
|
- Use a specific Ruby version across the whole system:
|
2018-06-14 18:08:50 +01:00
|
|
|
|
|
|
|
`rbenv global {{version}}`
|
|
|
|
|
2021-01-04 18:01:41 +00:00
|
|
|
- Use a specific Ruby version for an application/project directory:
|
2018-06-14 18:08:50 +01:00
|
|
|
|
|
|
|
`rbenv local {{version}}`
|
|
|
|
|
2021-01-04 18:01:41 +00:00
|
|
|
- Display the currently selected Ruby version:
|
2018-06-14 18:08:50 +01:00
|
|
|
|
|
|
|
`rbenv version`
|
|
|
|
|
2021-01-04 18:01:41 +00:00
|
|
|
- Uninstall a Ruby version:
|
2018-06-14 18:08:50 +01:00
|
|
|
|
|
|
|
`rbenv uninstall {{version}}`
|
|
|
|
|
2021-01-04 18:01:41 +00:00
|
|
|
- Display all Ruby versions that contain the specified executable:
|
2018-06-14 18:08:50 +01:00
|
|
|
|
|
|
|
`rbenv whence {{executable}}`
|