celluloid / celluloid-redis

UNMAINTAINED: See celluloid/celluloid#779
MIT License
50 stars 9 forks source link

NoMethodError: private method `open' called for Celluloid::IO::TCPSocket:Class #1

Closed tisba closed 11 years ago

tisba commented 11 years ago

I'm trying to use celluloid-redis with jruby, but I cannot get a very simple app running:

require "celluloid/redis"
redis = Redis.new(driver: :celluloid)
redis.get "foo"

Running this script using bundle exec ruby sandbox.rb I get:

NoMethodError: private method `open' called for Celluloid::IO::TCPSocket:Class
               connect at /Users/basti/.rvm/gems/jruby-1.7.3/gems/celluloid-redis-0.0.1/lib/redis/connection/celluloid.rb:22
  establish_connection at /Users/basti/.rvm/gems/jruby-1.7.3/gems/redis-3.0.3/lib/redis/client.rb:271
               connect at /Users/basti/.rvm/gems/jruby-1.7.3/gems/redis-3.0.3/lib/redis/client.rb:69
      ensure_connected at /Users/basti/.rvm/gems/jruby-1.7.3/gems/redis-3.0.3/lib/redis/client.rb:290
               process at /Users/basti/.rvm/gems/jruby-1.7.3/gems/redis-3.0.3/lib/redis/client.rb:177
               logging at /Users/basti/.rvm/gems/jruby-1.7.3/gems/redis-3.0.3/lib/redis/client.rb:256
               process at /Users/basti/.rvm/gems/jruby-1.7.3/gems/redis-3.0.3/lib/redis/client.rb:176
                  call at /Users/basti/.rvm/gems/jruby-1.7.3/gems/redis-3.0.3/lib/redis/client.rb:84
                   get at /Users/basti/.rvm/gems/jruby-1.7.3/gems/redis-3.0.3/lib/redis.rb:737
           synchronize at /Users/basti/.rvm/gems/jruby-1.7.3/gems/redis-3.0.3/lib/redis.rb:36
       mon_synchronize at /Users/basti/.rvm/rubies/jruby-1.7.3/lib/ruby/1.9/monitor.rb:211
           synchronize at /Users/basti/.rvm/gems/jruby-1.7.3/gems/redis-3.0.3/lib/redis.rb:36
                   get at /Users/basti/.rvm/gems/jruby-1.7.3/gems/redis-3.0.3/lib/redis.rb:736
                (root) at sandbox.rb:4
D, [2013-03-15T13:33:42.895000 #17048] DEBUG -- : Terminating 4 actors...
D, [2013-03-15T13:33:42.899000 #17048] DEBUG -- : Shutdown completed cleanly
tarcieri commented 11 years ago

That's odd... the tests do at least that much and JRuby passes under CI

tisba commented 11 years ago

@tarcieri here is what I used: https://gist.github.com/tisba/5170822

As I said, I run the test by bundle exec ruby sandbox.rb

tisba commented 11 years ago

I don't see how this can actually work, looking at https://github.com/celluloid/celluloid-io/blob/v0.13.0.pre/lib/celluloid/io/tcp_socket.rb

tarcieri commented 11 years ago

You need master:

https://github.com/celluloid/celluloid-io/blob/master/lib/celluloid/io/tcp_socket.rb#L13

tisba commented 11 years ago

@tarcieri okay, this is pretty confusing, that the dependency you specified in your gem is not working ;) if this will be necessary for a little while, you should consider adding a note to the readme.

tarcieri commented 11 years ago

Sorry, in the middle of a release cycle here, so the dependencies don't quite match up. Also this gem is rather bleeding edge

tisba commented 11 years ago

No problem, just a bit confusing.