代码之家  ›  专栏  ›  技术社区  ›  Slartibartfast

尝试使用Zookeeper gem时获取“未初始化的常量Zookeeper(NameError)”

  •  2
  • Slartibartfast  · 技术社区  · 16 年前

    我想用 zookeeper gem

    require 'rubygems'
    require 'zookeeper'
    z = Zookeeper.new("localhost:2181")
    z.get_children(:path => "/")
    

    导致错误:

    ./zookeeper.rb:3: uninitialized constant Zookeeper (NameError)
     from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
     from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
     from zookeeper.rb:2
    

    我在搜索和寻找代码,我真的不知道该怎么做。。。

    1 回复  |  直到 16 年前
        1
  •  4
  •   steenslag    16 年前

    别打电话给你的档案动物园管理员.rb.

    推荐文章