vagrant plugin install vagrant-winnfsd
# Edit Vagrantfile
# A private dhcp network is required for NFS to work (on Windows hosts, at least)
config.vm.network "private_network", type: "dhcp"
# add ', nfs:true' to each shared folder
BUT ... NFS is case-insensitive. This means that anything going into your shared folder that might depend on case-sensitivity can cause errors. For rails, this can cause errors like so:
Errno::EEXIST at / File exists @ dir_s_mkdir - tmp/cache/assets/sprockets/v3.0/Pd
This isn't likely to be a problem for files YOU create, but it will inevitably happen anywhere where lots of files are automatically created with UUIDs. Examples include sprockets files in the rails tmp directory and fcrepo files.
Solution - set the RAILS_TMP directory to be outside of the shared folder
First set ENV['RAILS_TMP'] (eg. in .env or .rbenv-vars or directly with export - however you normally set environment variables):
Then configure this in config/application.rb or config/environments/development.rb:
config.assets.configure do |env|
env.cache = Sprockets::Cache::FileStore.new(
end if ENV['RAILS_TMP']