Hi, Hobo rocks! I'm a very happy bunny.
However...
Up until now, I've been doing some asynchronous processing on my hobo
app and its models
with script/runner. I thought I get a little tidier, so I changed the
mechanism over to the daemons
gem and the daemon_generator plugin.
I can't get even a skeleton daemon to run.
Here's my daemon...
#!/usr/bin/env ruby
# You might want to change this
ENV["RAILS_ENV"] ||= "production"
require File.dirname(__FILE__) + "/../../config/environment"
$running = true
Signal.trap("TERM") do
$running = false
end
while($running) do
# Replace this with your code
ActiveRecord::Base.logger.info "Registration daemon is still running
at #{Time.now}.\n"
#ProcessRaw.register
sleep 10
end
and heres the log output.....
Tue Jul 21 12:28:37 +0100 2009
SIGTERM
["/usr/lib/ruby/1.8/daemons/monitor.rb:42:in `sleep'", "/usr/lib/ruby/
1.8/daemons/monitor.rb:42:in `watch'", "/usr/lib/ruby/1.8/daemons/
monitor.rb:84:in `start_with_pidfile'", "/usr/lib/ruby/1.8/daemons/
monitor.rb:64:in `fork'", "/usr/lib/ruby/1.8/daemons/monitor.rb:64:in
`start_with_pidfile'", "/usr/lib/ruby/1.8/daemons/monitor.rb:111:in
`start'", "/usr/lib/ruby/1.8/daemons/application_group.rb:113:in
`create_monitor'", "/usr/lib/ruby/1.8/daemons/application.rb:244:in
`start'", "/usr/lib/ruby/1.8/daemons/controller.rb:69:in `run'", "/usr/
lib/ruby/1.8/daemons.rb:139:in `run'", "/usr/lib/ruby/1.8/daemons/
cmdline.rb:105:in `call'", "/usr/lib/ruby/1.8/daemons/cmdline.rb:
105:in `catch_exceptions'", "/usr/lib/ruby/1.8/daemons.rb:138:in
`run'", "lib/daemons/registration_ctl:25"]
*** below you find the most recent exception thrown, this will be
likely (but not certainly) the exception that made the application
exit abnormally ***
#<NameError: uninitialized constant Hobo::Guest>
*** below you find all exception objects found in memory, some of them
may have been thrown in your application, others may just be in memory
because they are standard exceptions ***
#<NoMemoryError: failed to allocate memory>
#<SystemStackError: stack level too deep>
#<fatal: exception reentered>
#<NameError: uninitialized constant Hobo::ModelController>
#<MissingSourceFile: no such file to load -- /CameraData/shootserver/
shootserver/app/controllers/application>
#<Errno::ENOENT: No such file or directory - /CameraData/shootserver/
shootserver/log/registration.rb.pid>
#<MissingSourceFile: Missing helper file helpers/
user_mailer_helper.rb>
#<MissingSourceFile: no such file to load -- user_mailer_helper>
#<NameError: uninitialized constant Hobo::Guest>
Am I snookered? Or have I missed something bleeding obvious?
TIA
Mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---