[Mongrel] mongrel not daemonizing for me..

aaron smith beingthexemplarylists at gmail.com
Tue Jun 26 19:43:28 EDT 2007


On 6/26/07, aaron smith <beingthexemplarylists at gmail.com> wrote:
>
> Ok here is my latest configurator block..
>
>   config = Mongrel::Configurator.new(:host => OPTIONS[:ip]) do
>     #debug('/gateway.rb',[:access,:threads])
>     listener :port => OPTIONS[:port] do
>       uri("/gateway.rb", :handler => RUBYAMF::MongrelServlet.new,
> :num_processors => OPTIONS[:processes])
>     end
>   end
>
>   if OPTIONS[:daemon]
>     config.daemonize(:log_file => '../../rubyamf_core/logs/mongrel.log')
>   end
>
>   config.run.join
>
>
>
> I get one error:
> usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:182:in
> `join': can't convert nil into String (TypeError)
>
>
> Thanks everyone
>


Ok I got it daemonizing correctly with this config block

  config = Mongrel::Configurator.new(:host => OPTIONS[:ip]) do
    #debug('/gateway.rb',[:access,:threads])
    listener :port => OPTIONS[:port] do
      uri("/gateway.rb", :handler => RUBYAMF::MongrelServlet.new)
    end
  end

  if OPTIONS[:daemon]
    config.daemonize(:cwd => Dir.pwd, :log_file =>
'/rubyamf_core/logs/mongrel.log')
  end

  config.run.join


Now my question is: why doesn't it run as expected with its daemonized.. if
I run it without being daemonized it's fine.. but as soon as its daemonized
it doesn't run as expected. Any ideas?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070626/f59c3128/attachment.html 


More information about the Mongrel-users mailing list