Skip to content

Instantly share code, notes, and snippets.

@john-hamnavoe
Last active December 5, 2022 22:41
Show Gist options
  • Save john-hamnavoe/07090e6c2e0808749079cfd5f79ec778 to your computer and use it in GitHub Desktop.
Save john-hamnavoe/07090e6c2e0808749079cfd5f79ec778 to your computer and use it in GitHub Desktop.

Basic Install of HomeBrew and Rails

Follow https://gorails.com/setup/macos/11-big-sur

Additional Notes after install brew need to run commands:

- Run these three commands in your terminal to add Homebrew to your PATH:
    echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /Users/johnwallace/.zprofile
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/johnwallace/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"```
    
When doing SSH set for github just hit enter to accept default file name when prompted for file name. 
Also just hit enter for no passphrase when doing SSH step for github.

When testing SSH answer yes when asked Are you sure you want to continue connecting (yes/no/[fingerprint])?

When first installing rails had 'You don't have write permissions for the /Library/Ruby/Gems/2.6.0' error did `rbenv rehash` 
and ran install rails again and it worked.

Set up VSCode code command line

Open the Command Palette (Cmd+Shift+P) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command. Answer yes to questions, enter password and should be able use code in terminal

Install nvm

brew update

brew install nvm

mkdir ~/.nvm

code ~/.zshrc

Copy the details from brew install into .zshrc currently it is

export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh"  # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"  # This loads nvm bash_completion

Open new terminal nvm -v check that it has worked.

Install Node

This will install the new node version nvm install node Install specific version (hatchbox default at time of writing) nvm install v18.12.1 Install the one I have used on old mac nvm install v14.15.0

Default that version nvm alias default v18.12.1

Install Yarn

npm install --global yarn

Check that worked yarn --version

Install Redis

brew install redis

brew services start redis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment