Vagrant on Mac El Capitan problem

I recently tried to install vagrant on a Mac OS X.11 (El Capitan) machine, but ran into trouble. It simply wouldn’t function. I traced it back to the embedded version of ruby that it comes with, which kept throwing the error SIGSEGV (Address boundary error) even when running directly.

My solution was to symlink a working version of ruby in place of the failing embedded version. I used homebrew to install vagrant, because macports doesn’t have it, but macports to install ruby, because I prefer it. The overall operation went like this on the command line:

brew cask install vagrant
sudo port install ruby27
mv /opt/vagrant/embedded/bin/ruby /opt/vagrant/embedded/bin/xruby
ln -nfs /opt/local/bin/ruby2.7 /opt/vagrant/embedded/bin/ruby

I renamed the embedded ruby just in case I needed it. You could probably remove it if you wanted.

Running it this way unfortunately results in a bunch of notices being output when run, making it hard to see the important output, but I haven’t found a way around that yet.

I haven’t updated vagrant yet, but I imagine I’ll have to redo this when I do.