我正在使用ruby守护进程gem为我的rails项目创建一个自定义守护进程。唯一的问题是,当我尝试启动守护进程ruby lib/daemons/test_ctl start时,它失败了,并且不会启动。日志文件具有以下输出。
# 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插件)并尝试运行它时,也会发生这种情况。有人知道如何解决这个问题吗?
发布于 2008-10-22 09:17:18
好了,我真的找到了这个问题的答案。我需要在config/environment.rb中有两个自定义文件。我使用了相对路径名,因为守护进程是在rails主目录中执行的,所以它找不到这两个文件。在使它们成为绝对路径之后,它解决了这个问题。
发布于 2008-12-14 06:48:29
我刚刚花了30分钟来解决一个类似的错误,当我试图让守护程序插件工作时:
LoadError: no such file to load -- active_support由于某种原因,它找不到active_support库,即使它已经安装。(可能是因为我的rails冻结了)。
在我的例子中,这个问题的解决方案是在我的
ctl文件(如lib/daemons/mailer_ctl)。
我需要将第5行从:
require 'active_support'至
require './vendor/rails/activesupport/lib/active_support.rb'https://stackoverflow.com/questions/224845
复制相似问题