Forum: Ruby on Rails ActiveLdap: no such file to load -- ldap (MissingSourceFile)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2fa87d4eaa7d6a499cf05527f8898428?d=identicon&s=25 Allen Fair (allen)
on 2007-06-06 20:56
I just installed ActiveLdap, copied the plugin into vendor/plugins and
setup a config/ldap.yml file. Starting rails gives me an error that it
can not find the ldap source file. (I installed from the gem with its
prerequisites log4r, etc.)

/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- ldap (MissingSourceFile)
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
        from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
        from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
        from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
        from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:7:in
`require_library_or_gem'
        from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/reporting.rb:11:in
`silence_warnings'
        from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/kernel/requires.rb:5:in
`require_library_or_gem'
        from
/usr/local/lib/ruby/gems/1.8/gems/ruby-activeldap-0.8.2/lib/active_ldap/adapter/ldap_ext.rb:1
         ... 33 levels...
        from
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in
`run'
        from
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243
        from /usr/local/bin/mongrel_rails:16:in `load'
        from /usr/local/bin/mongrel_rails:16

I have tried putting require's in environment.rb without success. I am
using current gems of rails. I have also tried to execute this in a
non-rails program test program, but receive the same message there too.

I'm not sure which file it wants, but i see it here
    /usr/local/lib/ruby/1.8/uri/ldap.rb

Has anyone seen this type of error before and can offer a clue on how to
resolve it?

Allen
2fa87d4eaa7d6a499cf05527f8898428?d=identicon&s=25 Allen Fair (allen)
on 2007-06-06 22:18
Allen Fair wrote:
> I just installed ActiveLdap, copied the plugin into vendor/plugins and
> setup a config/ldap.yml file. Starting rails gives me an error that it
> can not find the ldap source file. (I installed from the gem with its
> prerequisites log4r, etc.)

Solved! I had not installed the prerequisite ruby-ldap library. This is
not available as a gem so did not get installed as an active_ldap
dependency.

Hint: I had to install ruby-ldap from the the FreeBSD ports, and trying
to install it from source was not working (configuration problems).

Allen
This topic is locked and can not be replied to.