2008-10-22 143 views
3

我正在使用ruby守护进程gem为我的rails项目创建自定义守护进程。唯一的问题是,当我尝试启动守护进程ruby lib/daemons/test_ctl start它失败并且不会启动。日志文件具有此输出。Ruby守护进程不会启动

# Logfile created on Wed Oct 22 16:14:23 +0000 2008 by/ 
*** below you find the most recent exception thrown, this will be likely (but not certainly) the exception that made the application exit abnormally \*\*\* 
# MissingSourceFile: no such file to load -- utf8proc_native 
*** 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> 
# LoadError: no such file to load -- daemons> 
# LoadError: no such file to load -- active_support> 
# MissingSourceFile: no such file to load -- lib/string> 
# MissingSourceFile: no such file to load -- utf8proc_native> 

时,我产生一个守护进程(从Rails插件),并尝试运行它有时甚至会出现。有谁知道如何解决这个问题?

回答

3

好的,我真的找到了这个问题的答案。我需要config/environment.rb中的两个自定义文件。我使用相对路径名称,并且因为守护进程在rails主目录中执行,所以无法找到这两个文件。在使它们成为绝对路径后,它解决了问题。

+0

我能得到它由Daemons.run线前加入这一行的工作: `$ < duma 2011-06-27 19:09:58

1

我只花了30分钟试图解决一个类似的错误试图让守护进程插件工作时:

LoadError: no such file to load -- active_support 

出于某种原因,人们没有找到active_support lib下,即使它被安装。 (也许是因为我有冰冻的铁轨)。
在我的情况下,解决方案是在我的
ctl文件(例如lib/daemons/mailer_ctl)中使用active_support的绝对路径。

我需要从改变线路5:

require 'active_support' 

require './vendor/rails/activesupport/lib/active_support.rb'