A while ago after struggling for weeks with trying to make all of the different gems configurations work on our Macs, our team switched to using Vagrant for development, matching our CentOS production deployment environment.
Our team except for me. It was dead slow, and I refused to be convinced that this is better than the wrestling exercise of getting the oci gems working (see previous posts). Once OCI is installed, things mostly work, and at least it’s fast enough that your test suite gives you feedback quickly enough that it’s not a chore to run.
This was until I had to install the LWES gem. It simply doesn’t work on Mac OS X. Game over, give up, switch to Vagrant, and cry.
6 hours it took to red-green-refactor a simple API library, because of the many minutes it took for each spec to run.
Fortunately, a simple config change makes all the difference:
config.vm.share_folder "lui", "/home/vagrant/project_name", ".", :nfs => true
config.vm.network :hostonly, "192.168.255.2"
Voila! A seemingly 10X improvement in performance. Apparently switching to a :hostonly network with :nfs is the magic trick to making this a totally workable environment.
Unfortunately it does not work on Windows for those of you living in that world.