ActiveLDAP cannot load in script/console

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

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…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs