better running of rails

This commit is contained in:
John Bintz 2011-05-28 18:35:01 -04:00
parent 526f25ba9d
commit 70e1f110f9

View File

@ -36,9 +36,11 @@ module Guard
end end
def start_rails def start_rails
system %{sh -c 'rails s -d -e #{options[:environment]} -p #{options[:port]} --pid #{pid_file}'} system %{sh -c 'cd #{Dir.pwd} && rails s -e #{options[:environment]} -p #{options[:port]} --pid #{pid_file} &'}
sleep 2 while !File.file?(pid_file)
UI.info "Rails running, PID #{File.read(pid_file)}" sleep 0.5
end
UI.info "Rails restarted, pid #{File.read(pid_file)}"
end end
def stop_rails def stop_rails