In Chapter 13, if you’re using an Ubuntu-based machine or VM, installing WebPacker fails due to what seems to be problems with yarn:
ERROR: [Errno 2] No such file or directory: 'add'
Further research shows that someone seems to have messed up an apt-get script and trying to install yarn actually installs “cmdtest”.
I fixed this by doing the following:
sudo apt remove cmdtest curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt update sudo apt install yarn
Then I was able to continue.