Posts Tagged ‘BackgrounDRb’

Quick tip for BackgrounDRb users

January 9, 2009

Earlier today I was configuring BackgrounDRb, and I started to receive this error:

 

 

lucas@work:~$ script/backgroundrb start

        Starting BackgrounDRb …. 

/app/trunk/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:42:in `initialize’: No such file or directory – /app/current/tmp/pids/backgroundrb_11006.pid (Errno::ENOENT)

        from /app/trunk/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:42:in `open’

        from /app/trunk/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:42:in `start’

        from /app/current/script/backgroundrb:35

After a little bit of hacking, I found that it tries to create the pid file, but fails if the directories are not created. Something I don’t understand is why the plugin doesn’t create it, since it is so simple.

So, if this problem ever happens to you, a simple mkdir RAILS_HOME/tmp/pids will save your life.

Dica rápida para quem usa BackgrounDRb

January 9, 2009

Hoje, ao tentar configurar o BackgrounDRb, comecei a tomar esse erro na cara ao tentar subir o servidor de processos:

lucas@work:~$ script/backgroundrb start

        Starting BackgrounDRb …. 

/app/trunk/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:42:in `initialize’: No such file or directory – /app/current/tmp/pids/backgroundrb_11006.pid (Errno::ENOENT)

        from /app/trunk/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:42:in `open’

        from /app/trunk/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_start_stop.rb:42:in `start’

        from /app/current/script/backgroundrb:35

Depois de fuçar um pouco, o problema é que se o arquivo não existe, ele tenta criar, mas falha se o diretório pids não existir. O que eu não entendi é porque ele não cria os diretórios que faltam no meio do caminho.
Enfim, se esse problema acontecer com você, um simples mkdir RAILS_HOME/tmp/pids salvará a sua vida.