Upgrade snap store. This command will tell you the PID you need to kill before the command will succeed.
sudo snap refresh snap-store
Install ruby prequisites
sudo apt-get install autoconf patch build-essential rustc libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libgmp-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev uuid-devsudo