gpt4 book ai didi

Ruby 守护进程不会启动

转载 作者:数据小太阳 更新时间:2023-10-29 07:58:11 27 4
gpt4 key购买 nike

我正在使用 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 插件)并尝试运行它时发生。有人知道如何解决这个问题吗?

最佳答案

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

关于Ruby 守护进程不会启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/224845/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com