Vagrant shared folder with rails server
Asked Answered
S

1

2

I'm running rails on a nfs shared folder in a vagrant box. While the server (thin/webrick) is running I'm editing files in my host. But I have to keep stopping and restarting the application server to see changes reflected in the webapp. Is this normal behaviour?

Superphysical answered 11/6, 2013 at 18:23 Comment(2)
Maybe the same issue - #4880104Ill
@MattCooper No I think it is a different beast. It is the sync process between the host and the vagrant VM.Gesellschaft
B
2

I go this issue on Vagrant box synchronising my folder with NFS.

I made a change in my application development configuration file (config/environments/development.rb), just adding this line config.reload_classes_only_on_change = false and it works.

Ensure that you have this config.cache_classes = false as well, I had it by default when I setup rails application (using version 4.1.5), because where I found that workaround (http://edgeguides.rubyonrails.org/configuring.html) says that config.reload_classes_only_on_chage = false is ignored if config.cache_classes is true

Another solution is use vagrant Rsync synchronise mechanism, which is available from version 1.5 and have some benefits, but for me it doesn't work because I run out of space if I have to make a copy of my workspace on each virtual machine that I have.

Boogeyman answered 23/8, 2014 at 21:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.