[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

daemons error

Junkone

2/27/2008 7:38:00 PM

I thought the daemon would create the pid file. but however i get this
strange error.
require "Daemons"
options = {
:app_name => "my_app",
:ARGV => ['start', '-f'],
# :dir_mode => :script,
:dir => 'pids',
:multiple => true,
:ontop => true,
:mode => :exec,
:backtrace => true,
:monitor => true,
:script => "E:\\TradingTools\\Development\\app\\helpers\\"
}
filename="E:\\TradingTools\\Development\\app\\helpers\\twsMonitor.rb"
Daemons.run(filename, options)


No such file or directory - E:/TradingTools/Development/app/helpers/
pids/my_app0.pid
e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/pidfile.rb:
83:in `initialize'
e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/pidfile.rb:
83:in `open'
e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/pidfile.rb:
83:in `pid='
e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
application.rb:104:in `start_exec'
e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
application.rb:230:in `start'
e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
controller.rb:69:in `run'
e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/Daemons.rb:136:in
`run'
e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/cmdline.rb:
105:in `call'
e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/cmdline.rb:
105:in `catch_exceptions'
e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/Daemons.rb:135:in
`run'
E:/TradingTools/Development/app/helpers/Ruby-1.rb:15
e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/daemonize.rb:
126:in `initialize': stream closed (IOError)
from E:/Program Files/ActiveState Komodo IDE 4.2/lib/support/dbgp/
rubylib/rdbgp/interface.rb:96:in `join'
from E:/Program Files/ActiveState Komodo IDE 4.2/lib/support/dbgp/
rubylib/rdbgp/interface.rb:96:in `end_session'
from E:/Program Files/ActiveState Komodo IDE 4.2/lib/support/dbgp/
rubylib/rdbgp/interface.rb:162:in `shutdown'
from E:/Program Files/ActiveState Komodo IDE 4.2/lib/support/dbgp/
rubylib/rdbgp/processor.rb:118:in `shutdown'
from E:/Program Files/ActiveState Komodo IDE 4.2/lib/support/dbgp/
rubylib/rdbgp/processor.rb:386:in `wrap_up'
from E:/Program Files/ActiveState Komodo IDE 4.2/lib/support/dbgp/
rubylib/rdbgp/processor.rb:366:in `each'
from E:/Program Files/ActiveState Komodo IDE 4.2/lib/support/dbgp/
rubylib/rdbgp/processor.rb:366:in `wrap_up'
from E:/Program Files/ActiveState Komodo IDE 4.2/lib/support/dbgp/
rubylib/rdbgp/loader.rb:106:in `wrap_up'
from E:/Program Files/ActiveState Komodo IDE 4.2/lib/support/dbgp/
rubylib/rdbgp/loader.rb:133
from E:/Program Files/ActiveState Komodo IDE 4.2/lib/support/dbgp/
rubylib/rdbgp/loader.rb:132:in `skip'
from E:/Program Files/ActiveState Komodo IDE 4.2/lib/support/dbgp/
rubylib/rdbgp/loader.rb:132
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
cmdline.rb:110
e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/pidfile.rb:
83:in `initialize': No such file or directory - E:/TradingTools/
Development/app/helpers/pids/my_app0.pid (Errno::ENOENT)
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
pidfile.rb:83:in `open'
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
pidfile.rb:83:in `pid='
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
application.rb:104:in `start_exec'
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
application.rb:230:in `start'
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
controller.rb:69:in `run'
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/Daemons.rb:
136:in `run'
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
cmdline.rb:105:in `call'
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
cmdline.rb:105:in `catch_exceptions'
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/Daemons.rb:
135:in `run'
from E:/TradingTools/Development/app/helpers/Ruby-1.rb:15

2 Answers

yermej

2/28/2008 5:07:00 AM

0

On Feb 27, 1:38 pm, Junkone <junko...@gmail.com> wrote:
> I thought the daemon would create the pid file. but however i get this
> strange error.
> require "Daemons"
> options = {
....
> :dir => 'pids',
....
> No such file or directory - E:/TradingTools/Development/app/helpers/
> pids/my_app0.pid
....

Does the pids directory already exist?

Junkone

2/28/2008 6:24:00 PM

0

On Feb 28, 12:06 am, yermej <yer...@gmail.com> wrote:
> On Feb 27, 1:38 pm, Junkone <junko...@gmail.com> wrote:> I thought the daemon would create the pid file. but however i get this
> > strange error.
> > require "Daemons"
> > options = {
> ...
> >     :dir        => 'pids',
> ...
> > No such file or directory - E:/TradingTools/Development/app/helpers/
> > pids/my_app0.pid
>
> ...
>
> Does the pids directory already exist?

u r right. it did not exist.