If the version you need is missing, try upgrading ruby-build. linux
To upgrade ruby-build on Linux, you can follow these steps:
Check the current version of ruby-build: Open a terminal and run the following command to check the current version of ruby-build installed on your Linux system:
ruby-build --version
Install or update rbenv: If you don't have rbenv installed, you can install it using a package manager like apt or yum. Run the appropriate command based on your Linux distribution:
- For Ubuntu or Debian-based systems:
sudo apt-get update sudo apt-get install rbenv
For CentOS or Fedora-based systems:
sudo yum update sudo yum install rbenv
Install or update ruby-build: Use the rbenv plugin manager, called "ruby-build," to install or update ruby-build. Run the following command:
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
Update your shell configuration: To enable rbenv and ruby-build, you need to update your shell configuration file. Open the file
~/.bashrc
(for Bash) or~/.zshrc
(for Zsh) using a text editor such as Nano or Vim. Add the following lines at the end of the file:export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)"
Reload the shell configuration: After saving the changes to your shell configuration file, reload the configuration by running the appropriate command based on your shell:
- For Bash:
source ~/.bashrc
For Zsh:
source ~/.zshrc
Verify the installation: Run the following command to verify that ruby-build has been updated successfully:
ruby-build --version
By following these steps, you should be able to upgrade ruby-build on your Linux system.