Linux Update Ruby Version
Install appropriate ruby packages.
Linux update ruby version. Does anyone know how to actually have this version replace 2 2 1 in all my apps. The installed version is typically the latest version of ruby available at the release time of the specific distribution version. Download ruby here you can get the latest ruby distributions in your favorite flavor. Which ruby home rupert rvm rubies ruby 2 4 1 bin ruby.
The output will look something like this. The current stable version is 2 7 1. Do you want to know where your ruby binary is installed. Read our next articles to deploy ruby with apache or ruby with nginx web server with simple steps.
Just run which ruby. Ruby 2 5 1p57 2018 03 29 revision 63029 x86 64 linux gnu installing ruby using rbenv. To verify that you have a current version of ruby run the command ruby v. Ruby version ruby 2 7 0p0 2019 12 25 revision 647ee6f091 x86 64 linux congratulation s finally you have successfully installed ruby on your system.
I did sudo apt get install ruby v 2 2 4 but all it did was install it somehwere it did not actually replace 2 2 1 with 2 2 4 i e when i use ruby v it gives me 2 2 1. Compare the version number returned with the version number on the ruby download page. Snap ubuntu or other linux distributions snap is a package manager developed by canonical. It can also sometimes reveal the version you are using as it is usually part of directory structure.
It is available out of the box on ubuntu but snap also works on many other linux distributions. Sudo apt install ruby full. Please be sure to read ruby s license. To verify that the installation it was successful run the following command which will print the ruby version.
To upgrade from ruby 2 3 to 2 6 first you ll need to upgrade your version of ruby. Rvm install 2 6 1 rvm use 2 6 1 default.