Ruby Installation
Install rbenv
- Click here to download the file for
rbenv
installation.
- From a terminal, execute the command below to give the
install-rbenv.mac.sh
script executable permissions
chmod u+x ~/Downloads/install-rbenv.mac.sh
- From a terminal, execute the command below to run the
install-rbenv.mac.sh
script
~/Downloads/install-rbenv.mac.sh
- After the installation is complete, exit out of the terminal.
What is rbenv?
- Use
rbenv
to install a new version of Ruby. For example, to install Ruby 2.7.2, run the following command:
- Set the global Ruby version to the newly installed version by running the following command:
- Verify that the correct version of Ruby is being used by running the following command:
- Finally, install the bundler gem using the following command:
- This should install the bundler gem for the newly installed version of Ruby and allow you to use it without needing root privileges.