Ilya Biltuevon Stack Overflow • Recommends
On “You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user)”
I also struggled with this Ruby problem and finally found an easy and working solution for Mac with M1 chip.
To install Ruby I used a simple ruby manager called chruby (https://github.com/postmodern/chruby#readme)
Steps:
Install Homebrew (video guide here: link to this video)
Install chruby with command:
brew install chruby ruby-install
Install the latest ruby version with command:
ruby-install ruby
Edit .zshrc file. You can use nano or any other text editor.
.zshrc file is located in root directory and is a hidden file.
This file is responsible for Terminal commands.
nano ~/.zshrc
Add these two lines to .zshrc file and save it. Instead of 3.2.2 put Ruby version you installed in S…