# Problem with daemons gem

**URL:** <https://www.ruby-forum.com/t/problem-with-daemons-gem/167638>\
**Category:** Rails\
**Created:** [May 10, 2009, 9:04pm UTC](https://www.ruby-forum.com/t/problem-with-daemons-gem/167638 "2009-05-10T21:04:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [May 10, 2009, 9:04pm UTC](https://www.ruby-forum.com/t/problem-with-daemons-gem/167638/1 "2009-05-10T21:04:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tkbeili](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Post date:** [May 10, 2009, 11:52pm UTC](https://www.ruby-forum.com/t/problem-with-daemons-gem/167638/2 "2009-05-10T23:52:25Z")

</div>

On May 10, 8:04 pm, Tam K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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
