Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What exactly does this command do, in regards to running a Rails server?

~$ sudo touch restart.txt

I thought it restarts the Rails server, but it happens so fast when I run it, that I can hardly believe it's really rebooting the Rails server. It's fixed my problem a bunch of times, but I would like to know why it works, and what it's doing.

Thanks!

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

If you are using Passenger, then it's monitoring the timestamp of the tmp/restart.txt file to trigger restarts.

share|improve this answer
1  
ahh, so passenger is looking at it and when it sees a newer timestamp, it knows to restart itself? –  Goldentoa11 May 11 '12 at 18:58
1  
@Goldentoa11 yes. –  whitequark May 11 '12 at 19:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.