$ arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
### I made sure /opt/homebrew/bin was in my path before /usr/local/bin. Then I aliased the Intel brew to ibrew so it’s easier to select. Here’s what I added to my ZSH configuration:
export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
alias ibrew='arch -x86_64 /usr/local/bin/brew'
### then just run
ibrew tap homebrew/versions
ibrew install v8-315
gem install libv8 -v '3.16.14.19' -- --with-system-v8
gem install therubyracer -v '0.12.3' -- --with-v8-dir=/usr/local/opt/v8@3.15