I am running guard on my laptop. It is monitoring changes to the files underneath config/ & lib/, and causes the whole server to restart.
I'd like to have the page reload after the server is restarted, but I'm not sure how to trigger that from something outside the rails process. Here was my first attempt at it:
require "socket"
require "json"
command = {
"event" => "reload",
"files" => ["app/assets/builds/application.js"]
}
socket = UNIXSocket.new("tmp/sockets/rails_live_reload.sock")
socket.puts command.to_json