Forum: Ruby on Rails problem with daemons gem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
330edb8dc8bbc5a824984cf46e941b2f?d=identicon&s=25 Tam Kbe (tkbeili)
on 2009-05-10 21:04
  0  vote down
star


Hello,

I'm using daemons gem with Rails in addition to daemon_generator plugin.
I'm getting this output in the daemons log file:

 Logfile created on Sat May 09 20:10:35 -0700 2009 by /
-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 SmsMessage>
-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>
#<MissingSourceFile: no such file to load --
./config/global_constants.conf>
#<NameError: uninitialized constant SmsMessage>

I'm finding very hard to make sense from this output. It's displaying
different error messages and I can tell it's not it's not the
./config/global_constants.conf issues because I don't call it inside the
daemon file. Plus I don't think it's a memory issues as my Mac has 2GB
of memory and not many programs running. as for the SmsMessage I'm
calling it normally using:

scheduledMessagesParent = SmsMessage.valid.find(:all, :conditions =>
{:status => $SCHEDULED_MESSAGE})

which works elsewhere in my website!! I noticed that the logger is
called using

ActiveRecord::Base.logger.info "....

Is it possible I have to specify my model's path in another way? I
normally call the logger using logger.info without the need for
ActiveRecord::Base. If so how to do that?

Any ideas how to go about debugging this problem? is there a way to
display stack trace or better error messages?

Thanks,

Tam
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-05-10 23:52
(Received via mailing list)
On May 10, 8:04 pm, Tam Kbe <rails-mailing-l...@andreas-s.net> wrote:
>
> I'm finding very hard to make sense from this output. It's displaying
> different error messages and I can tell it's not it's not the
> ./config/global_constants.conf issues because I don't call it inside the
> daemon file. Plus I don't think it's a memory issues as my Mac has 2GB
> of memory and not many programs running. as for the SmsMessage I'm
> calling it normally using:
>
Are you requiring the rails environment ?

Fred
This topic is locked and can not be replied to.