Member-only story

Overriding built in ruby for MacOS Sonoma

Jurin Liyun
2 min readJul 23, 2024

--

As a Flutter developer, I’ve found that using the built-in Ruby in macOS can be challenging. This issue surfaced when I tried to use the flutter_osm_plugin that requires the Alamofire library.

The error was overwhelming and took me a few days to find the correct solution. So, I decided to give Homebrew a shot to install Ruby and then install CocoaPods. If you guys have the same problem as me, I think this would be useful to save you lots of time finding the right solution.

Let’s get started!

In this tutorial, we will do the following:

  1. Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "eval $(/opt/homebrew/bin/brew shellenv)" >> ~/.zprofile
eval $(/opt/homebrew/bin/brew shellenv)

After installing the homebrew, you can test it by running this command brew — versionin your terminal. if its correctly installed, the output should be as follows.

2. Install chruby and ruby-install

brew install chruby ruby-install

3. Install ruby using the ruby-install

ruby-install ruby

--

--

Jurin Liyun
Jurin Liyun

Written by Jurin Liyun

Developer, Trainer , Consultant, Father of two children

No responses yet