Here's the exact code I use in production to determine whether or not
ferret is running. It works just fine for me, although I wish there
was some way to state that thin shouldn't be started prior to ferret
spinning up.
http://pastie.org/704341
I hope you find it helpful.
Brett