Ruby - Zookeeper gem version wrong number of arguments (3 for 4) (ArgumentError) -
i have installed ruby 2.0.0p195 , following gem
gem install net-ssh gem install rdoc gem install zookeeper ruby zookeeper client installed (ver - 1.4.4)
but when execute sample ruby script check node exists , create node on zookeeper:
require 'rubygems' require 'zookeeper' z = zookeeper.new("localhost:2181") if !z.exists("/app", :watch => true) z.create("/app","app root node",:mode => :ephemeral) end z.get_children(:path => "/")
...it throws following error.
zookeeper-1.4.4/lib/zookeeper/continuation.rb:172:in `zkrb_exists': wrong number of arguments (3 4) (argumenterror) .rvm/gems/ruby-2.0.0-p195/gems/zookeeper-1.4.4/lib/zookeeper/continuation.rb:172:in `submit' .rvm/gems/ruby-2.0.0-p195/gems/zookeeper-1.4.4/ext/c_zookeeper.rb:303:in `submit_pending_calls' .rvm/gems/ruby-2.0.0-p195/gems/zookeeper-1.4.4/ext/c_zookeeper.rb:261:in `event_thread_body'
can please me on resolving problem?
require "rubygems"
require "zk"
zk = zk.new
zk.open('localhost:2181') |zk| if !zk.exists?('/root')
zk.create("/root", :data => "foo")
end
end
started using zk instead of zookeeper gems. working fine now, not sure exact solution above argument error.
Comments
Post a Comment