celluloid / reel

UNMAINTAINED: See celluloid/celluloid#779 - Celluloid::IO-powered web server
https://celluloid.io
MIT License
596 stars 87 forks source link

Documented example does not work #193

Open mperham opened 9 years ago

mperham commented 9 years ago

"Block Form" in the README raises an error:

Celluloid::Error: Thread pool is not running
    /Users/mike/.gem/ruby/2.2.1/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:29:in `assert_running'
    /Users/mike/.gem/ruby/2.2.1/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:62:in `block in get'
    /Users/mike/.gem/ruby/2.2.1/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:61:in `synchronize'
    /Users/mike/.gem/ruby/2.2.1/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:61:in `get'
    /Users/mike/.gem/ruby/2.2.1/gems/celluloid-0.16.0/lib/celluloid/actor_system.rb:30:in `get_thread'
    /Users/mike/.gem/ruby/2.2.1/gems/celluloid-0.16.0/lib/celluloid/thread_handle.rb:10:in `initialize'
    /Users/mike/.gem/ruby/2.2.1/gems/celluloid-0.16.0/lib/celluloid/actor.rb:128:in `new'
    /Users/mike/.gem/ruby/2.2.1/gems/celluloid-0.16.0/lib/celluloid/actor.rb:128:in `start'
    /Users/mike/.gem/ruby/2.2.1/gems/celluloid-0.16.0/lib/celluloid/cell.rb:43:in `initialize'
    /Users/mike/.gem/ruby/2.2.1/gems/celluloid-0.16.0/lib/celluloid.rb:168:in `new'
    /Users/mike/.gem/ruby/2.2.1/gems/celluloid-0.16.0/lib/celluloid.rb:168:in `new'
    /Users/mike/.gem/ruby/2.2.1/gems/celluloid-0.16.0/lib/celluloid/supervisor.rb:10:in `supervise'
    /Users/mike/.gem/ruby/2.2.1/gems/celluloid-0.16.0/lib/celluloid.rb:188:in `supervise'
digitalextremist commented 9 years ago

Adding require 'celluloid/autostart' before require 'reel', the example works. I will either update the docs or update Reel to start the actor system. In 0.17.0 this is the default.

digitalextremist commented 9 years ago

Temporarily updated the docs until the default behavior is updated in 0.6.5