New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Rails 4.1 broke autoreload using NFS with a VirutalBox VM #16678
Comments
I think it has to do with your NFS/Vagrant settings. |
Autoreloading worked with the settings for Rails 3.2 though which is the only reason I consider this a Rails issue. Do you know of a different way to set up the VM to get autoreloading working with Rails 4.1? |
Experiencing the same issue on a very recent rails 4 upgrade running inside a vagrant ubuntu vm. I've noticed that autoreload does appear to function, but takes about ~3 minutes to pick up any change. Was also running rails 3.2 before, and everything was peachy. |
May or may not be related: I have issues with Guard (in polling mode) picking up changes consistently using Vagrant and Virtualbox (w/ shared folders) and Rails 4.1 (with Spring both enabled and disabled). The files get updated fine, the changes just don't get detected half the time. |
It can still be a problem on vagrant. We didn't changed anything in the code reloader feature between Rails 3 and Rails 4. The only thing in our side that I could think is spring. I'm not a vagrant user and I think most of core member are not so I'd recommend you do investigate the problem or this issue will be open for some months until our bot mark it as stale and close. |
thanks for the input @rafaelfranca - i can confirm that in my scenario, sync'ing the clocks between the host operating system and vagrant did in fact resolve the issue. cheers! |
Thank you for confirming. Closing. |
Thank you so much!!! I've been poking around this for a few days! |
I ran into this issue and solved it with this in my # Sync time every 5 seconds so code reloads properly
config.vm.provider :virtualbox do |v|
v.customize ["guestproperty", "set", :id, "--timesync-threshold", 5000]
end |
The workaround @axsuul posted worked for me. Thanks very much! |
@axsuul Thanks for the workaround, worked for me. |
I have this same problem on docker, it reloads fine for everything except controllers. |
The same here, with docker.
When I deploy this code, I get errors. I comment it out, deploy again and the errors are gone. Immediately afterwards I remove the comments, deploy again, and still no errors. Rails 4.2.6 |
I think I figured it out, at least my problem.
The real time, however, is present in the file and can be seen with --full-time. When the VM/container reaches the real filetime, the file is refreshed. It is as described in 65dc45e, but I don't think it is abnormal as is said in the comment. It will happen often when communicating with a remote server and you are not always in a position to change remote server time. |
Hi I'm using Vagrant to run a Rails app on a VirtualBox Ubuntu VM, and sharing a directory between the host and guest over NFS.
I upgraded a Rails 3.2 app to Rails 4.1 and auto-reloading stopped working. I tested this with a simple Rails 4.1 demo app that you can see here https://github.com/benedictfischer09/reload_problem Looks like auto reloading doesn't work with Rails 4.1 and this VM setup (I didn't test 4.0).
I opened a SO question but it hasn't seen much attention so I figured I'd open an issue here too http://stackoverflow.com/questions/25451327/rails-4-1-doesnt-autoreload-on-vagrant-vm
The text was updated successfully, but these errors were encountered: