berkshelf / ridley

A reliable Chef API client with a clean syntax
Other
231 stars 85 forks source link

Celluloid::Error after moving to 4.3.2 #321

Open wdeviers opened 8 years ago

wdeviers commented 8 years ago

Howdy,

After moving from a considerably older version of Ridley using Celluloid .14 to 4.3.2 and Celluloid 0.16.0 (-io 0.16.2) I get the following stack trace. This is on a Sinatra app. I've tried some of the suggestions like calling Celluloid.boot, but I really have no idea what I'm doing in this regard.

2015-10-27 14:22:18 - Celluloid::Error - Thread pool is not running: /home/wdeviers/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:29:in assert_running' /home/wdeviers/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:62:inblock in get' /home/wdeviers/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:61:in synchronize' /home/wdeviers/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:61:inget' /home/wdeviers/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/actor_system.rb:30:in get_thread' /home/wdeviers/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/thread_handle.rb:10:ininitialize' /home/wdeviers/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:128:in new' /home/wdeviers/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:128:instart' /home/wdeviers/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:43:in initialize' /home/wdeviers/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid.rb:168:innew' /home/wdeviers/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid.rb:168:in new' /home/wdeviers/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/ridley-4.3.2/lib/ridley.rb:29:innew' griddle.rb:35:in get_chef_connection' griddle.rb:24:inblock in

'

In lib/ridley.rb, doing this:

    # @return [Ridley::Client]
    def new(*args)
      Celluloid.boot
      Client.new(*args)
    end

seems to "Fix" the problem but I doubt this is the correct way to handle it.