# ActiveLdap: no such file to load -- ldap (MissingSourceFile)

**URL:** <https://www.ruby-forum.com/t/activeldap-no-such-file-to-load-ldap-missingsourcefile/106142>\
**Category:** Rails\
**Created:** [June 6, 2007, 8:56pm UTC](https://www.ruby-forum.com/t/activeldap-no-such-file-to-load-ldap-missingsourcefile/106142 "2007-06-06T20:56:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![allen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@allen](https://www.ruby-forum.com/u/allen)\
**Post date:** [June 6, 2007, 8:56pm UTC](https://www.ruby-forum.com/t/activeldap-no-such-file-to-load-ldap-missingsourcefile/106142/1 "2007-06-06T20:56:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![allen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@allen](https://www.ruby-forum.com/u/allen)\
**Post date:** [June 6, 2007, 10:18pm UTC](https://www.ruby-forum.com/t/activeldap-no-such-file-to-load-ldap-missingsourcefile/106142/2 "2007-06-06T22:18:18Z")

</div>

Allen F. 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
