我已经安装了 ruby 2.0.0p195 和以下 gem
gem install net-ssh
gem install rdoc
gem install zookeeper
Ruby Zookeeper client installed successfully (ver - 1.4.4)
但是当我执行示例 ruby 脚本来检查节点是否存在并在 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 => "/")
...它引发以下错误。
zookeeper-1.4.4/lib/zookeeper/continuation.rb:172:in `zkrb_exists': wrong number of arguments (3 for 4) (ArgumentError)
from .rvm/gems/ruby-2.0.0-p195/gems/zookeeper-1.4.4/lib/zookeeper/continuation.rb:172:in `submit'
from .rvm/gems/ruby-2.0.0-p195/gems/zookeeper-1.4.4/ext/c_zookeeper.rb:303:in `submit_pending_calls'
from .rvm/gems/ruby-2.0.0-p195/gems/zookeeper-1.4.4/ext/c_zookeeper.rb:261:in `event_thread_body'
谁能帮我解决这个问题?