I don't know real detailed specifics about vagrant settings but after I tried to resync my box when it started up. The vagrant box won't update the content I changed from my text editor to the box after the box is booted and before it is stopped and rebooted again. The command I used is below:
config.vm.synced_folder ".", "/vagrant", type: "rsync"
I needed to resync because my rails server is running slowly on my machine locally. I was wondering:
1) Is this the behavior expected?
2) Are there other options to speed up my rails server so it doesn't take 1 second for every javascript file to load?
With your configuration you'll need:
$ vagrant up
$ vagrant rsync-auto
And at other terminal you can do:
$ vagrant ssh
And your app folder must be updated on virtual machine when you change at your develop environment.
But, I config my sync folders with Vagrant basic usage, it means without type
option (let vagrant chose the best type, also it keeps sync):
config.vm.synced_folder ".", "/vagrant"
And I use one terminal for vagrant stuff, with only these commands:
$ vagrant up
$ vagrant ssh
Answer 1) If you need use rsync, yes this is the behavior expected: folders will not been updated unless you start vagrant rsync-auto
(I've tested this option)
Answer 2) You must expect a degradation on performance running a virtual machine, because you had limited some memory and cpu processors (unless you are running on Windows OS -I don't test it-).
Please make sure:
rsync.exe
on the pathrsync
or rsync-auto
command is used to start vagrant, Without running these commands, Vagrant only syncs the folders on vagrant up
or vagrant reload
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With