Starting RoR application in production

Hi,

I have read and complet this very nice tutorial
Ruby on Rails Blog / What is Ruby on Rails for? (without Postfix) and it’s
working perfectly.

But when I start my RoR web server (Lighty), I must always execute this
command :

ruby script/server

…and I can’t do anything in my shell. And if I exit my shell, the
server go down, such as when we do Ctrl + C.

So now, I would like to starting my RoR server with my project
automatically and on the 80 number port (in production mode).

What can I do for that ?

Thanks

First of all, the -d flag causes the server to run in the background.
Which is what you want, only you need to use the kill command to stop
it. Depending what distro you’re on, you need to do something a little
different to get the service to start up with the machine. First, you
can copy config/lighttpd.conf to /etc/lighttpd/lighttpd.conf. For
production, you need to edit it. At least change the number of min_procs
and max_procs to a slightly higher number than “1”. Change the
environment from development to production. Then on Redhat or Fedora(or
CentOS), for instance, if you installed from RPM, you could type #
chkconfig --levels 35 lighttpd on
and that would cause lighttpd to start up automatically with the
machine. This varies by distro as does the default location of
lighttpd.conf.
Read some tutorials about it, then give it a try.

Jason

Thanks for help Jason ! :o)