Delay to sync code changes in rails

64 views
Skip to first unread message

Contato i7webmidia

unread,
Jul 17, 2015, 3:11:04 PM7/17/15
to vagra...@googlegroups.com

Hello.


I'm having the following problem:


I have a rails project using vagrant with ubuntu on my windows machine.


I put my project in a shared folder vagrant (/ vagrant).


When I make any change in any class, I need to wait about 40 seconds 

for the rails server reflects the changes, or restart the server.


PS: This problem does not occur when I change any view.


But if I copy the rails project folder out of the shared folder, any changes 

I make in the code of the classes, are immediately reflected by the server.


What could have caused this problem, since everything worked perfectly 

there two days ago?


Grateful.

Alvaro Miranda Aguilera

unread,
Jul 17, 2015, 9:08:55 PM7/17/15
to vagra...@googlegroups.com
Hello,

This is an known issue I am afraid.. basically is due the shared
folder used in virtualbox is a psedo filesystem and not a full
filesystem, so not all the information on update/change/read/etc goes
to the guest.

Mitchell did this analysis some time ago:
http://mitchellh.com/comparing-filesystem-performance-in-virtual-machines


Some options are:
- use a git repo and put the code on a native filesystem,
- other people test (with mixed results) nfs or samba
- others move away to VMWare ($$$$) because is better (also with mixed results)

Sorry for not being more helpful

Alvaro.
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/a8f7e7f6-35e1-44da-96f0-c9a509cf9e13%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Contato i7webmidia

unread,
Jul 18, 2015, 9:02:52 AM7/18/15
to vagra...@googlegroups.com
Thank Alvaro.

I use NFS mode, but by the way did not solve.

I think I'll try to see if the VMWARE resolve.

Again, thanks for the help.

:)

Contato i7webmidia

unread,
Jul 18, 2015, 10:33:54 AM7/18/15
to vagra...@googlegroups.com
I'm trying to work with SMB.

But when I run the command "vagrant up", the prompt stops in the second message, like this:

$ Vagrant up
Bringing machine 'default' up with 'virtualbox' provider ...
==> Default: Checking if box 'hashicorp / precise64' is up to date ...


My Vagrantfile is with this setting:

Vagrant.configure(2) do |config|
  config.vm.box = "hashicorp/precise64"
  config.vm.network "forwarded_port", guest: 3000, host: 3000
  config.vm.synced_folder ".", "/vagrant", type: "smb"
end


If I type "control + c", then show message bellow:
==> default: Waiting for cleanup before exiting...


Is there anything else I need to do?

Thank you very much!

Jamie Jackson

unread,
Jul 24, 2015, 5:24:51 PM7/24/15
to Vagrant, con...@i7webmidia.com.br
I also ran into this same hang today with the smb share type. I never did get past it, and what's annoying is that the port mappings get left behind and I have to kill off those port-holding processes every time I re-tried it. (Vagrant 1.7.4)
Reply all
Reply to author
Forward
0 new messages