Enable Rack::LiveReload on demand to avoid JS errors.
This commit is contained in:
parent
48ff43aaed
commit
05adf9a534
2 changed files with 12 additions and 10 deletions
2
Gemfile
2
Gemfile
|
@ -144,7 +144,7 @@ group :development, :test do
|
||||||
# livereload on template changes (html, js, css)
|
# livereload on template changes (html, js, css)
|
||||||
gem 'guard', require: false
|
gem 'guard', require: false
|
||||||
gem 'guard-livereload', require: false
|
gem 'guard-livereload', require: false
|
||||||
gem 'rack-livereload'
|
gem 'rack-livereload', require: false
|
||||||
gem 'rb-fsevent', require: false
|
gem 'rb-fsevent', require: false
|
||||||
|
|
||||||
# auto symlinking
|
# auto symlinking
|
||||||
|
|
|
@ -31,6 +31,7 @@ Rails.application.configure do
|
||||||
#config.assets.debug = true
|
#config.assets.debug = true
|
||||||
config.assets.debug = false
|
config.assets.debug = false
|
||||||
|
|
||||||
|
if defined?(Rack::LiveReload)
|
||||||
# Automatically inject JavaScript needed for LiveReload
|
# Automatically inject JavaScript needed for LiveReload
|
||||||
config.middleware.insert_after(
|
config.middleware.insert_after(
|
||||||
ActionDispatch::Static,
|
ActionDispatch::Static,
|
||||||
|
@ -40,6 +41,7 @@ Rails.application.configure do
|
||||||
max_delay: 10_000, # default 60_000
|
max_delay: 10_000, # default 60_000
|
||||||
live_reload_port: 35_738
|
live_reload_port: 35_738
|
||||||
)
|
)
|
||||||
|
end
|
||||||
|
|
||||||
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
||||||
# yet still be able to expire them through the digest params.
|
# yet still be able to expire them through the digest params.
|
||||||
|
|
Loading…
Reference in a new issue