I am trying to deploy an app with Mongrel2-rack-rails3 stack. I am using khi-rack-mongrel2 handler for ruby rack. The problem is that even if I setup everything for local development, I can't make rails server daemonize itself by running it with -d
option. While starting without daemonization option I get following output:
% rails s Mongrel2
=> Booting Mongrel2
=> Rails 3.0.9 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
The handler starts and I can make requests to my rails app. However If I start my server with -d
option I get this:
% rails s Mongrel2 -d
=> Booting Mongrel2
=> Rails 3.0.9 application starting in development on http://0.0.0.0:3000
The handler starts, but does not daemonize itself. Can someone point me out to the issue at hand?
Here are the contents of my config.ru file:
require ::File.expand_path('../config/environment', __FILE__)
Rack::Handler::Mongrel2.run(MyProject::Application,
:recv => 'tcp://127.0.0.1:2050',
:send => 'tcp://127.0.0.1:2051',
:uuid => 'my_project'
)