From 15d8cb213d27e38bd67c1e92f639e73cc7f085bb Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 4 Sep 2018 16:54:38 +0200 Subject: [PATCH] Enable Rack::LiveReload via environment variable RAKE_LIVE_RELOAD. --- config/environments/development.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 90b61895d..cdb296b42 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -31,8 +31,9 @@ Rails.application.configure do #config.assets.debug = true config.assets.debug = false - if defined?(Rack::LiveReload) - # Automatically inject JavaScript needed for LiveReload + # Automatically inject JavaScript needed for LiveReload + if ENV['RAKE_LIVE_RELOAD'].present? + require 'rack-livereload' config.middleware.insert_after( ActionDispatch::Static, Rack::LiveReload,