Fix Vagrant's Hot Reloading issues in development

Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
This commit is contained in:
Sebastian Serth
2018-09-18 12:12:29 +02:00
parent 763277d35a
commit 1f2d098541
2 changed files with 6 additions and 4 deletions

View File

@ -69,6 +69,8 @@ Rails.application.configure do
BetterErrors::Middleware.allow_ip! ENV['TRUSTED_IP'] if ENV['TRUSTED_IP'] BetterErrors::Middleware.allow_ip! ENV['TRUSTED_IP'] if ENV['TRUSTED_IP']
# Use an evented file watcher to asynchronously detect changes in source code, # Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem. # routes, locales, etc. This feature depends on the listen gem and might not
config.file_watcher = ActiveSupport::EventedFileUpdateChecker # work within a Vagrant environment.
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
config.file_watcher = ActiveSupport::FileUpdateChecker
end end

View File

@ -21,14 +21,14 @@ environment ENV.fetch("RAILS_ENV") { "development" }
# Workers do not work on JRuby or Windows (both of which do not support # Workers do not work on JRuby or Windows (both of which do not support
# processes). # processes).
# #
# workers ENV.fetch("WEB_CONCURRENCY") { 2 } workers ENV.fetch("WEB_CONCURRENCY") { 2 }
# Use the `preload_app!` method when specifying a `workers` number. # Use the `preload_app!` method when specifying a `workers` number.
# This directive tells Puma to first boot the application and load code # This directive tells Puma to first boot the application and load code
# before forking the application. This takes advantage of Copy On Write # before forking the application. This takes advantage of Copy On Write
# process behavior so workers use less memory. # process behavior so workers use less memory.
# #
# preload_app! preload_app!
# Allow puma to be restarted by `rails restart` command. # Allow puma to be restarted by `rails restart` command.
plugin :tmp_restart plugin :tmp_restart