1

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

像这样:

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)

在守护进程的每个文件中我加载应用程序配置,在这个配置之上我放置“需要'捆绑器/设置'”

当我从守护进程控制运行时,在日志中出现错误

 bundle exec ruby run_daemon.rb daemon_name start

但是当我没有恶魔直接运行时

 bundle exec ruby path_do_daemon/daemon_name.rb

没有错误

4

0 回答 0