Tutorial: Setup Ruby and Jekyll on Apple Silicon
M1 and M2 Macs are amazing. They offer great performance paired with a phenomenal stability. But every good thing has its negatives and for Macs it’s their compatibility. Especially when we’re dealing with DevOps related stuff, it can cause problems easily. Of course we have stuff like Rosetta (you can learn more about that here) to get ahead of some problems but at the end, it’s not the definite solution for everything.
On top of this, these compatibility issues also start to happen when we try to install or modify the system related software like Ruby or Python. Because these types of utilities are also being used (thus pre-installed) by the Darwin core set so we have to proceed carefully in order to install them in the correct way.
Install Xcode and Homebrew
Install Ruby 3.0.x
MacOS systems generally come with Ruby 2.x. You can check it with:
To install Ruby 3.1.x:
After that follow the shell output and export the PATH
according to the terminal you’re using.
Exit the terminal and open up a new one. Type ruby -v
to make sure it’s 3.x.
Install Jekyll and Bundler
And only thing left is to export the PATH
again for the gems.
After this you’re all set. You can either create brand new Jekyll sites or build the existing ones following their guidelines.