When using Rails by way of a shared Vagrant folder we need to edit one config file to ensure that the Rails server works properly.
After creating a new Rails application (but before starting the Rails server) the following file in a text editor:
config/environments/development.rb
Change the second last line in this file (line 53) from:
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
To:
config.file_watcher = ActiveSupport::FileUpdateChecker
Save and close this file. The rails server should now work properly.
If this doesn't fully solve the problem, you can also try adding the following to the
config/environments/development.rb
file:config.reload_classes_only_on_change = false
WARNING: This may slow down your development server significantly.