# ActiveLDAP cannot load in script/console

**URL:** <https://www.ruby-forum.com/t/activeldap-cannot-load-in-script-console/145868>\
**Category:** Rails\
**Created:** [August 14, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/activeldap-cannot-load-in-script-console/145868 "2008-08-14T17:07:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gordons11](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a88e4f/32.png) [@gordons11](https://www.ruby-forum.com/u/gordons11)\
**Post date:** [August 14, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/activeldap-cannot-load-in-script-console/145868/1 "2008-08-14T17:07:07Z")

</div>

For some reason ActiveLDAP will not load when I run script/console and  
it says

`require’: no such file to load – active\_ldap (LoadError)

It loads fine when I run script/server though. So whenever I want to  
load the console I just comment out the require “active\_ldap” from  
config/environment.rb then run it then I uncomment that line. Kind of a  
hassle, so I wanna know why this is happening.

Oh and when I run irb -rubygems and use require “active\_ldap”, it works  
fine also. So there is something wrong with loading the console from  
rails. o\_O

---

<div class="post-metadata">

**Author:** ![gordons11](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a88e4f/32.png) [@gordons11](https://www.ruby-forum.com/u/gordons11)\
**Post date:** [August 29, 2008, 9:53pm UTC](https://www.ruby-forum.com/t/activeldap-cannot-load-in-script-console/145868/2 "2008-08-29T21:53:46Z")

</div>

I solved my problem…noobish mistake. in the config/enviroment.rb i  
did

require “active\_ldap”

when in fact I should have done

config.load\_paths += %W(#{RAILS\_ROOT}/vendor/activeldap-trunk/lib)  
config.plugin\_paths +=  
%W(#{RAILS\_ROOT}/vendor/activeldap-trunk/rails/plugin)

to load the plug-in.

Also i didn’t use the gem version of this plug-in…
