Skip to content

Instantly share code, notes, and snippets.

@marocchino
Forked from thbar/Guardfile
Created October 31, 2013 05:24
Show Gist options
  • Save marocchino/7244696 to your computer and use it in GitHub Desktop.
Save marocchino/7244696 to your computer and use it in GitHub Desktop.
require 'childprocess'
guard 'shell' do
watch %r{^app/(.+)\.rb$} do |m|
`killall rake`
# Why this:
# - spawn a child process to avoid locking Guard
# - make sure that the child process has stdout and stdin otherwise it crashes
# - bonus point: get REPL access in the simulator!
process = ChildProcess.build('rake')
process.io.inherit!
process.start
end
end
gem install guard
gem install guard-shell
gem install rb-fsevent
gem install childprocess
guard -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment