EventMachine fails to initialize new PeriodicTimer

1,092 views
Skip to first unread message

Jeff Cook

unread,
Jan 26, 2012, 4:12:24 PM1/26/12
to EventMachine
I just installed the eventmachine gem. However, when I attempt to
initialize a PeriodicTimer, I get a RuntimeError: eventmachine not
initialized: evma_install_oneshot_timer. I am not sure what to do from
here. The gem installation went smoothly and didn't report any errors.

I am using Ruby 1.9.3-p0 through rvm.

Please let me know what information would be helpful in fixing this.

1.9.3-p0 :002 > require 'eventmachine'
=> true
1.9.3-p0 :003 > EventMachine::PeriodicTimer.new(5)
RuntimeError: eventmachine not initialized: evma_install_oneshot_timer
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/eventmachine-0.12.10/lib/
eventmachine.rb:375:in `add_oneshot_timer'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/eventmachine-0.12.10/lib/
eventmachine.rb:375:in `add_timer'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/eventmachine-0.12.10/lib/
em/timers.rb:47:in `schedule'
from /usr/local/rvm/gems/ruby-1.9.3-p0/gems/eventmachine-0.12.10/lib/
em/timers.rb:35:in `initialize'
from (irb):3:in `new'
from (irb):3
from /usr/local/rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in `<main>'

James Tucker

unread,
Feb 10, 2012, 2:07:50 AM2/10/12
to eventm...@googlegroups.com
Call it from within EM.run { }

> --
> You received this message because you are subscribed to the Google Groups "EventMachine" group.
> To post to this group, send email to eventm...@googlegroups.com.
> To unsubscribe from this group, send email to eventmachine...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/eventmachine?hl=en.
>

Reply all
Reply to author
Forward
0 new messages