script for production server

F

Florent THOMAS

[Note: parts of this message were removed to make it a legal post.]

Hello,

I'm pretty new with ruby and I've just installed retrospectiva with
success within ruby enterprise edition.
I ran with success the command : /XXXXX/bin/ruby script/server -e
production -p3000
Unfortunately as I close the shell, the server shut down.
How can I test that the server is in production in order to make it as a
service in a script.

best regards
 
M

Markus Schirp

This is not a ruby specific problem.

All processes started "normally" from a shell are terminated when the
shell exits.

There are many, many posibillities to avoid this, the most easy way
would be the use of the programm screen. But it has several diadvantages.

I suggest to use a process supervisor (it will restart your programm
when it crashes, and takes care of starting it after your server comes up).

Personally I use:

supervise (from djbs deamontools) and
monit

Feel free to google ;)

Mfg

Markus
 
F

Florent THOMAS

Thanks a lot for your answer.

I will search in this direction.
I was just wondering if there is a ruby command to test wether an
application runs or not.
Best regards


Le mardi 22 juin 2010 =E0 18:47 +0900, Markus Schirp a =E9crit :
 
F

Florent THOMAS

thanks for all your answers.
I found a package that works fine in Centos via webmin.

Best regards


Le mardi 22 juin 2010 =E0 21:50 +0900, (e-mail address removed) a =E9crit :
 
P

Paul Harrington

Florent said:
Hello,

I'm pretty new with ruby and I've just installed retrospectiva with
success within ruby enterprise edition.
I ran with success the command : /XXXXX/bin/ruby script/server -e
production -p3000
Unfortunately as I close the shell, the server shut down.
How can I test that the server is in production in order to make it as a
service in a script.

best regards

Maybe this is actually a Rails specific question? Just use the "-d" flag
to daemonize the server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,252
Latest member
MeredithPl

Latest Threads

Top