I'm running a test server in production environment with nginx as
front-end, ruby-1.9.1-p378 and one mongrel in the backend.
The script I'm currently using to start the application is as
# kill old server if running
if [ -f /home/csb/apps/ric/current/log/rackup.pid ]; then
echo "Stopping old server instance..."
kill `cat /home/csb/apps/ric/current/log/rackup.pid`
# startup new server
echo "Starting new server instance..."
rackup -D -E production -p 8010 -P /home/csb/apps/ric/current/log/
the export RAILS_ENV is needed because rackup seems to ignore the -E
option also I had to modify the server.rb file in the rack gem to keep
the application running in the background
I had to change the code to:
where it used to be:
daemonize_app if [:daemonize]
otherwise the process will just terminate if you call rackup -D I
opened an entry on the rack google group but never got any feedback.
You can find it here: http://groups.google.com/group/rack-devel/browse_thread/thread/db945afbffe5a0fc/29ca4400c6389a11