Skip to content

Instantly share code, notes, and snippets.

@CootCraig
Created September 25, 2012 17:14
Show Gist options
  • Save CootCraig/3783214 to your computer and use it in GitHub Desktop.
Save CootCraig/3783214 to your computer and use it in GitHub Desktop.
Celluloid crash on Windows JRuby 1.7 Java 1.8
$ jruby -v
jruby 1.7.0.RC1 (1.9.3p203) 2012-09-25 8e849de on Java HotSpot(TM) 64-Bit Server VM 1.8.0-ea-b57 +indy [Windows Server 2008 R2-amd64]
$ jruby --debug simple.rb
---------------
NoMethodError: undefined method `yield' for Fiber:Class
suspend at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/tasks/task_fiber.rb:35
suspend at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/task.rb:19
call at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/actor.rb:70
_send_ at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/proxies/actor_proxy.rb:19
new_link at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid.rb:90
__send__ at org/jruby/RubyBasicObject.java:1667
send at org/jruby/RubyKernel.java:2075
start at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/supervision_group.rb:133
initialize at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/supervision_group.rb:120
add at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/supervision_group.rb:80
supervise_as at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/supervision_group.rb:71
supervise_as at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/supervisor.rb:17
initialize at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/supervision_group.rb:63
__send__ at org/jruby/RubyBasicObject.java:1667
__send__ at org/jruby/RubyBasicObject.java:1673
send at org/jruby/RubyKernel.java:2079
dispatch at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/calls.rb:57
handle_message at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/actor.rb:320
initialize at c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/tasks/task_fiber.rb:22
E, [2012-09-25T11:06:33.122000 #2036] ERROR -- : Celluloid::SupervisionGroup crashed!
NoMethodError: undefined method `yield' for Fiber:Class
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/tasks/task_fiber.rb:35:in `suspend'
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/task.rb:19:in `suspend'
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/actor.rb:70:in `call'
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/proxies/actor_proxy.rb:19:in `_send_'
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid.rb:90:in `new_link'
org/jruby/RubyBasicObject.java:1667:in `__send__'
org/jruby/RubyKernel.java:2075:in `send'
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/supervision_group.rb:133:in `start'
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/supervision_group.rb:120:in `initialize'
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/supervision_group.rb:80:in `add'
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/supervision_group.rb:71:in `supervise_as'
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/supervisor.rb:17:in `supervise_as'
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/supervision_group.rb:63:in `initialize'
org/jruby/RubyBasicObject.java:1667:in `__send__'
org/jruby/RubyBasicObject.java:1673:in `__send__'
org/jruby/RubyKernel.java:2079:in `send'
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/calls.rb:57:in `dispatch'
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/actor.rb:320:in `handle_message'
c:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/celluloid-0.12.0/lib/celluloid/tasks/task_fiber.rb:22:in `initialize'
I, [2012-09-25T11:06:33.207000 #2036] INFO -- : Terminating 4 actors...
I, [2012-09-25T11:06:33.235000 #2036] INFO -- : Shutdown completed cleanly
GEM
remote: http://rubygems.org/
specs:
celluloid (0.12.0)
timers (>= 1.0.0)
timers (1.0.1)
PLATFORMS
java
DEPENDENCIES
celluloid
require "rubygems"
require "bundler/setup"
require 'celluloid'
class MyActor
include Celluloid
def hello
puts "I'm my own actor"
end
end
MyActor.supervise_as :my_actor
Celluloid::Actor[:my_actor].hello
sleep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment