Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails rails net ldap:未初始化常量::net错误_Ruby On Rails_Ruby_Ldap_Openldap - Fatal编程技术网

Ruby on rails rails net ldap:未初始化常量::net错误

Ruby on rails rails net ldap:未初始化常量::net错误,ruby-on-rails,ruby,ldap,openldap,Ruby On Rails,Ruby,Ldap,Openldap,我已经安装了openLDAP,并使用NetLDAP在RubyonRails中使用它。这里的问题是,我可以用这个gem绑定和serach,但是当它向目录添加一个条目时: @auth = {:method => :simple, :username => "cn=admin,dc=example,dc=test", :password => "password"} PORT = 389 HOST = "127.0.1.1" NET::LDAP.open(:host => HO

我已经安装了openLDAP,并使用NetLDAP在RubyonRails中使用它。这里的问题是,我可以用这个gem绑定和serach,但是当它向目录添加一个条目时:

@auth = {:method => :simple, :username => "cn=admin,dc=example,dc=test", :password => "password"}
PORT = 389
HOST = "127.0.1.1"
NET::LDAP.open(:host => HOST, :port => PORT, :auth => @auth) do |ldap|
@ldap.add(:dn => dn, :attributes => attr) .
此错误停止所有操作:
未初始化的常量ldapsconner::NET
,[指向打开的行]

  • net ldap已安装
  • 红宝石2
  • 轨道4
  • 操作系统:Ubuntu 13.4
您是否尝试过:

Net::LDAP

案子

我正要去,但还没有。谢谢