Brew install ruby.
Brew update ruby.
Use the package manager to install ruby.
We will be setting up a ruby on rails development environment on macos 10 14 mojave.
Homebrew lets you avoid possible security problems associated with using the sudo command to install software like node.
To uninstall follow the directions listed here.
Apt installs ruby v2 3 1.
Homebrew is package manager for macs which makes installing lots of different software like git ruby and node simpler.
Installing homebrew on a mac installation.
Homebrew is a commonly used package manager on macos.
This will take about 30 minutes.
The command is pretty straightforward.
Older versions of os x are mostly compatible so follow along as far as you can and then google search for any problems you run into.
Installing ruby using homebrew is easy.
The missing package manager for macos or linux.
Run brew install ruby.
With this homebrew will go out and fetch not only ruby but also any dependencies ruby needs to run.
To remove ruby with apt you ll need to check which versions of ruby you have installed.
Alright so now that homebrew is installed we can use it to install a newer version of ruby.
This should install the latest ruby version.
If ruby is already installed run brew upgrade ruby to upgrade to the latest version.