Install Homebrew
Homebrew is a package manager for MacOS.
- Open the Mac terminal and enter this at the command prompt:
> /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)” - Run > brew update to make sure it’s the most recent version of Homebrew
- Run > brew doctor to make sure your system is ready to brew
Setting up a default IDE (VS Code) for the Mac Terminal
- Download VS Code and install it.
- Within the Mac terminal, navigate to /Users/yourUserName and at the command prompt enter > touch .bash_profile to create a .bash_profile file
- Open the .bash_profile file by entering > open bash_profile
- Add the following line to your .bash_profile file and save it: export EDITOR=”code -w”
- Open VS Code and press Command + shift + p to open the command palette. Within the command palette type type code and click Shell Command: Install ‘code’ command in PATH.
- Within the terminal, at the command prompt enter this to refresh and use the latest version of your bash_profile file:
> source .bash_profile - Now you can edit any file by prefacing it with > code. Example: > code yourFilename OR > code . (to open the current directory)
Use Homebrew to Install Ruby
- At the Mac terminal command prompt, enter:
> brew install ruby
This will install ruby. You may see a message such as:
By default, binaries installed by gem will be placed into: /usr/local/lib/ruby/gems/2.7.0/bin - Opent your bash_profile file in VS Code to edit it:
> code ~/.bash_profile - Update the ~/.bash_profile file to have this line appear first in the file and then save it:
export PATH=/usr/local/opt/ruby/bin:$PATH
- Refresh the ~/.bash_profile file by entering:
> source ~/.bash_profile
Install Rails
- At the Mac terminal prompt enter:
> gem install Rails
Installing Node and Yarn
You might need Node.js and Yarn installed to manage your application’s JavaScript. (npm — node package manager — will be installed with Node). At the Mac terminal prompt, run:
> brew install node
Verify the installation worked by running a check on the version of Node installed:
> node –version
Install Yarn by running:
> brew install yarn
Verify the installation worked by running a check on the version of Yarn installed:
> yarn -v
Jazz Up the ZSH Terminal
https://www.freecodecamp.org/news/jazz-up-your-zsh-terminal-in-seven-steps-a-visual-guide-e81a8fd59a38/