Setup to run projects on macOS

Setup for macOS

See asdf tool for full instructions

  • install homebrew

see homebrew and brew for full instuctions

  • install asdf
brew install asdf

# add this to ~/.zshrc:
. /opt/homebrew/opt/asdf/libexec/asdf.sh
  • install ruby

see install Ruby with Asdf

asdf plugin add ruby
asdf install ruby latest
asdf global ruby 3.3.5    # or latest
source ~/.zshrc 
# -- OR --
source ~/.zprofile
# -- OR close/reopen the terminal
ruby -v
# should be 3.3.5
nano ~/.tool-versions
# add line to set ruby version
ruby 3.3.5

# to list all installed ruby versions:
asdf list ruby
# should show 3.3.5

Note to run a different ruby in a local directory:

cd the-project-directory
asdf local ruby 2.7.3
# cat .tool-versions
# should be 2.7.3
  • install nodejs

see install nodejs with Asdf

# install prerequisites
brew install gpg gawk

asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf install nodejs latest
asdf global nodejs latest
cat ~/.tool-versions 
# should be nodejs 22.9.0

node -v
# should be 22.9.0

# to list all installed ruby versions:
asdf list nodejs
# should show 22.9.0

- John Arrizza