We use rbenv for my Ruby development setup, which has been surprisingly effortless to setup and use https://github.com/rbenv/rbenv https://github.com/rbenv/ruby-build

We use nvm to manage NodeJS https://github.com/nvm-sh

  1. Ruby Installation (Note that this is platform-agnostic, but there are brew packages and the like)
# Install rbenv
git clone <https://github.com/rbenv/rbenv.git> ~/.rbenv
cd ~/.rbenv && src/configure && make -C src # If this fails, it doesn't matter

# Install ruby-build, which rbenv uses to grab scripts
mkdir -p "$(rbenv root)"/plugins
git clone <https://github.com/rbenv/ruby-build.git> "$(rbenv root)"/plugins/ruby-build
  1. NodeJS Installation:
curl -o- <https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh> | bash
  1. Add stuff to your .bashrc

We have some shell magic to set up our PATH with things, but this only matters if you have a bunch

# Ruby -- you don't have to do this PATH thing as long as you export to it in some way
paths=("$HOME/.rbenv/bin:"   # Ruby
       "$PATH"               # Existing PATH
)
export PATH=$(IFS=; echo "${paths[*]}")

eval "$(rbenv init -)"

# NodeJS
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \\. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \\. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
  1. Then finally you can restart your shell.

Just double check that rbenv and nvm are doing things right:

curl -fsSL <https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor> | bash

nvm
  1. Install NodeJS and Yarn
nvm install 10.17.0
npm install -g yarn
  1. Install Ruby, set it as default, and install Bundler
rbenv install 2.7.4
rbenv global 2.7.4

gem install bundler
  1. Remember to restart your shell afterwards, and to run bundle install, etc. in the PlaceCal repository!