在“Daemon.run”中运行ruby脚本时出现奇怪错误,并且在“bundle exec ruby​​”中没有错误

时间:2013-03-29 20:51:33

标签: ruby activerecord sinatra daemon koala

我用Daemons gem,app oAuth oh facebook写一些基于sinatra的应用程序并更改某些页面的封面。因此,当我直接从“bundle exec ruby​​ daemon.rb”调用守护进程时输出没有错误,但是当我运行这个守护进程使用日志对Daemons.run运行时,我看到很多错误:

像这样:

E, [2013-03-29T19:04:15.762886 #40814] ERROR -- : method `_create_callbacks' not defined in Class (NameError)
E, [2013-03-29T19:04:15.767114 #40814] ERROR -- : method `_active_authorizer' not defined in Class (NameError)
E, [2013-03-29T19:04:15.767434 #40814] ERROR -- : method `_protected_attributes' not defined in Class (NameError)
E, [2013-03-29T19:04:15.774713 #40814] ERROR -- : uninitialized constant MIME (NameError)
E, [2013-03-29T19:04:15.775264 #40814] ERROR -- : uninitialized constant Koala::HTTPService::MIME (NameError)
E, [2013-03-29T19:04:15.775527 #40814] ERROR -- : uninitialized constant Koala::MIME (NameError)
E, [2013-03-29T19:04:15.776317 #40814] ERROR -- : uninitialized constant Koala::HTTPService::UploadableIO::MIME (NameError)

E, [2013-03-29T19:04:15.779144 #40814] ERROR -- : read would block (OpenSSL::SSL::SSLError)

我使用宝石考拉,Sinatra / activerecord

我不明白为什么会这样?

PS:

我有守护进程控制脚本run_daemon.rb

 require 'daemons'
 ....
 file = file passed with argument
 Daemons.run(file, options)

在守护进程的每个文件中我加载应用程序配置,在此配置的顶部我放置“require'bundler / setup'”

当我从守护进程控件运行时,在日志中我有错误

 bundle exec ruby run_daemon.rb daemon_name start

但是当我没有魔鬼直接跑步时

 bundle exec ruby path_do_daemon/daemon_name.rb

没有错误

0 个答案:

没有答案