Rails server doesn't see code changes and reload files
Add the following to config/environments/development.rb
#config.file_watcher = ActiveSupport::EventedFileUpdateCheckerconfig.file_watcher = ActiveSupport::FileUpdateChecker
FileUpdateChecker
will detect by polling the change of the file.
I've solved my problem adding below line to the development.rb
file.
config.reload_classes_only_on_change = false
pocari's solution worked for me but I had to wait a few seconds before a page reload, otherwise the content was not always updated.
Adding an option to the synced_folder
as described in this answer worked fine:
config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['actimeo=1']
(and the change in development.rb
is not necessary)