Skip to content

Instantly share code, notes, and snippets.

@johnbintz
Created January 31, 2013 16:38
Show Gist options
  • Save johnbintz/4684194 to your computer and use it in GitHub Desktop.
Save johnbintz/4684194 to your computer and use it in GitHub Desktop.
Make guard, guard-livereload, and a Rails server play nice in Foreman, so that you can see logs in the Foreman output and so Guard doesn't take over the input/output.
module MyApplication
class Application < Rails::Application
config.logger = Logger.new($stdout)
config.middleware.insert_before(::Rack::Lock, ::Rack::LiveReload)
end
end
group :livereload do
guard 'livereload' do
watch(things)
end
end
rails: rails s
guard: guard -g livereload -i
@mlt
Copy link

mlt commented Oct 28, 2016

Just a heads up.. setting up logger like that will break web-console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment