2009-05-10 5 views
0

daemon_generator 플러그인 외에도 레일스에서 ​​데몬 젬을 사용하고 있습니다. 데몬 로그 파일에서이 출력을 얻었습니다 :레일에서 데몬 젬 관련 문제

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> 

이 출력에서 ​​의미를 찾기가 어렵습니다. 다른 오류 메시지를 표시하고 있습니다. 데몬 파일 내부에서 호출하지 않기 때문에 ./config/global_constants.conf 문제가 아니라고 말할 수 있습니다. 게다가 Mac의 메모리가 2GB이고 실행중인 프로그램이 많지 않기 때문에 메모리 문제라고 생각하지 않습니다. SmsMessage에 관해서는 일반적으로 다음과 같이 사용합니다 :

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

내 웹 사이트의 다른 곳에서 작동합니다 !! 나는 로거가

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

사용하여 호출 그것이 내가 다른 방법으로 내 모델의 경로를 지정해야 할 수 있습니다 것으로 나타났습니다? 나는 보통 Logger.info를 사용하여 ActiveRecord :: Base를 필요로하지 않고 로거를 호출한다. 그렇다면 그렇게하는 방법?

이 아이디어를 디버깅하는 방법에 대한 아이디어가 있습니까? 거기에 스택 추적 또는 더 나은 오류 메시지를 표시하는 방법은 무엇입니까?

답변

0

레일 환경에 데몬을로드하여이 문제를 해결했습니다. 그것은 내가 정보를 가지고있는 튜토리얼에 포함되지 않았지만 지금은 작동합니다 :)