Vagrant file resync: Vagrant Box does not update new content in a text editor

I do not know the real details about the settings of the tramps, but after I tried to re-synchronize my box when it started. The firewall will not update the content that I changed from my text editor in the field after the window loads and before it stops and reboots. The below command is below:

config.vm.synced_folder ".", "/vagrant", type: "rsync" 

I needed to re-synchronize because my rails server is starting slowly on my machine locally. It was interesting to me:

1) Is this behavior expected?

2) Are there other options to speed up my rails server, so does it take 1 second for every javascript file to be uploaded?

+6
source share
2 answers

With your configuration you will need:

 $ vagrant up $ vagrant rsync-auto 

And on another terminal you can do:

 $ vagrant ssh 

And your application folder should be updated on the virtual machine when changing in your development environment.

But I am setting up my synchronization folders with the basic use of Vagrant , this means without the type option (let the tramp choose the best type, it also syncs):

 config.vm.synced_folder ".", "/vagrant" 

And I use one terminal for stray things, only with these commands:

 $ vagrant up $ vagrant ssh 

Answer 1) If you need to use rsync, yes, this is the expected behavior: folders will not be updated unless you run vagrant rsync-auto (I tested this option)

Answer 2) You should expect a decrease in performance when working with a virtual machine, because you had limited memory and processor processors (if you do not work in Windows, I do not test it).

+5
source

Please make sure:

  • rsync.exe on the way
  • The rsync or rsync-auto command is used to start vagrant. Without executing these commands, Vagrant only syncs folders on vagrant up or vagrant reload
+3
source

Source: https://habr.com/ru/post/989842/


All Articles