ActiveLdap Sinatra在运行应用程序时出现错误

时间:2018-11-24 03:10:47

标签: ruby sinatra activesupport

在Gemfile中;

gem 'activeldap'
gem 'netldap'

在boot.rb文件中;

require 'thread' 
require 'rubygems'
require 'active_ldap'

$ldap = ActiveLdap::Base.establish_connection(host: 'somehost', port: 636, base: 'xyz', bind_dn: 'some@example.com', password: 'password', allow_anonymous: false, follow_referrals: true)

我遇到错误;

  

警告:如果您打算将ActiveSupport的任何核心扩展加载到Hash,请确保在 加载Sinatra :: Application或Sinatra :: Base之前进行。如果不是,则可以忽略此警告。 /Users/abc/.rvm/gems/ruby-2.3.0/gems/activesupport-3.0.0/lib/active_support/values/time_zone.rb:272:警告:循环参数参考-现在/Users/abc/.rvm /gems/ruby-2.3.0/gems/activeldap-1.0.9/lib/active_ldap.rb:894:in <top (required)>': uninitialized constant Dependencies (NameError) from /Users/abc/Documents/storageapi/boot.rb:23:in require'

有人遇到过这样的问题吗?我正在使用ruby 2.3.7。

0 个答案:

没有答案