Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 5 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .