草庐IT

FiberError

全部标签

ruby-on-rails - FiberError - 跨线程调用的纤程

我正在尝试在使用random-wordgem的Rails应用程序中编写一个小功能生成一个随机名词,然后将其复数。第一次访问开发中的页面时,我已经能够让它工作,但我希望脚本在每次加载页面时再次运行。现在,后续页面加载(直到我反弹服务器)给我WelcomeController#randomwords中的FiberError,fibercalledacrossthreads。我试图自己解决这个问题,但我对编程还很陌生,并不真正了解Fibers的工作原理。我尝试使用Queue,但无法弄清楚如何让它工作,同样是因为我不完全理解该类(class)。我将如何着手解决这个具体问题?来源:welcome

ruby - 简单使用 EM::Synchrony#sync 会导致 'root fiber' FiberError——我的错?

这个程序require'em-synchrony'##v1.0.0require'em-hiredis'##v0.1.0moduleEventMachinemoduleHiredisclassClientdefself.connect(host='localhost',port=6379)conn=new(host,port)EM::Synchrony.syncconn.connectconnendalias:old_method_missing:method_missingdefmethod_missing(sym,*args)EM::Synchrony.syncold_method

ruby - 简单使用 EM::Synchrony#sync 会导致 'root fiber' FiberError——我的错?

这个程序require'em-synchrony'##v1.0.0require'em-hiredis'##v0.1.0moduleEventMachinemoduleHiredisclassClientdefself.connect(host='localhost',port=6379)conn=new(host,port)EM::Synchrony.syncconn.connectconnendalias:old_method_missing:method_missingdefmethod_missing(sym,*args)EM::Synchrony.syncold_method

ruby-on-rails - 独立模式下的 Websocket-rails gem FiberError

我是第一次使用websocket-railsgem。当我尝试在独立模式下触发某些事件时,我的服务器出现错误。但是如果standalonemode=false则没有错误这是完整的堆栈跟踪FiberError-can'tyieldfromrootfiber:()Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/em-synchrony-ad17ce925fe4/lib/em-synchrony.rb:75:in`sync'redis(3.0.7)lib/redis/connection/