Skip to content

Instantly share code, notes, and snippets.

@dcousineau
Created May 22, 2014 19:53
Show Gist options
  • Save dcousineau/b8ec22eddc9b33ce6e35 to your computer and use it in GitHub Desktop.
Save dcousineau/b8ec22eddc9b33ce6e35 to your computer and use it in GitHub Desktop.
# Do this before running vagrant up
vagrant plugin install vagrant-bindfs
Vagrant.configure("2") do |config|
#...
nfs_setting = RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/
if nfs_setting
config.bindfs.bind_folder '/vagrant', '/var/www/yourproject'
config.vm.synced_folder "./", "/vagrant", id: "vagrant-root", :nfs => nfs_setting
else
config.vm.synced_folder "./", "/var/www/yourproject", id: "vagrant-root", :nfs => nfs_setting
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment