From 9f8388c2eb1f49101f168974e42d804467eee307 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 20 Jun 2017 15:44:01 -0400 Subject: [PATCH] FIX: start filesystem watcher when running under rails s --- config/environments/development.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 2a20d72d67c..61674f64304 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -49,16 +49,17 @@ Discourse::Application.configure do require 'rbtrace' - require 'stylesheet/watcher' - if defined? Puma - STDERR.puts "Starting CSS change watcher" - @watcher = Stylesheet::Watcher.watch - end if emails = GlobalSetting.developer_emails config.developer_emails = emails.split(",").map(&:downcase).map(&:strip) end + if defined? Rails::Server || defined? Puma + require 'stylesheet/watcher' + STDERR.puts "Starting CSS change watcher" + @watcher = Stylesheet::Watcher.watch + end + config.after_initialize do if ENV['BULLET'] Bullet.enable = true