Forum: Ruby on Rails Simpler scgi_ctrl

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
58c44a4a506d878f9a112f1d7b7cb87e?d=identicon&s=25 jeremyevans0 (Guest)
on 2005-11-12 12:50
(Received via mailing list)
I've been using Zed Shaw's SCGI Rails Runner for a while and I like
how simple it makes stopping and starting the rails instances.
However, I don't like that it relies on Drb (as that requires a
password and additional process).  If you turn off Drb, then you can't
easily stop or restart the rails processes, as you have to grep the
process list and send the necessary signals yourself.

I've attached a small script that handles starting and stopping the
rails processes without requiring Drb, by using a pid file to store
the process id.  It accepts only two commands, start and stop.  If you
want to use it, copy it to the same folder as scgi_ctrl, add
":disable_drb: true" to scgi.yaml then switch to the directory of the
rails add and run:

sscgi_ctrl start # To start/restart
sscgi_ctrl stop # To stop

It accepts a directory for the rails app:

sscgi_ctrl start /path/to/rails_app

It also accepts a config file name and pid file name:

sscgi_ctrl start /path/to/rails_app config/scgi.yaml.development

No testing (other than "works for me") or documentation included.  It
doesn't support clustering or sending signals other than TERM, but
those shouldn't be difficult to add.  It doesn't support Windows.  It
was designed with purely my own needs in mind, but just in case
someone else here might want similar functionality, I decided to mail
it to the list.
This topic is locked and can not be replied to.