Hello, I am currently working on a project using Ruby on Rails. So far,
I have a well-populated mySQL database the RoR refers to and the basic
scaffolding functions implemented. I also designed views/layouts that
furthers the basic scaffolding interface. No problem and no big
accomplishment by any means.
Now, I want to pull user information from an already existing LDAP
server and put that information on one of my pages, but I haven’t had
I searched for resources on the internet and have done many steps to get
to where I am now, but I hit a wall and currently do not know where to
Let me tell you what I did:
I am developing on a windows machine and started off following Chris
Scarf’s instructions to copy the ruby-ldap (0.9.4) library to a ruby
subdirectory so ruby has access to it.
However, I couldn’t find any reason to believe that this was all I
needed for RoR to pull LDAP information. I found examples of using the
ruby-ldap module in pure ruby code, but not within the rails framework.
This led me to Ruby/ActiveLDAP.
It requires the previously mentioned ruby-ldap module which I have and
log4r as well. I installed the log4r gem. I then installed
Ruby/ActiveLDAP from source. It was at this time that I followed these
Basically I add additional lines in environment.rb to connect to the
LDAP server, create directory and user model files, then create a
controller to access the information.
This is where I am at the moment. The previous link has a source with
views that I used to see if I could display a page with LDAP information
but I receive an uninitialized constant ActiveLDAP. When I type require
‘activeldap’ in irb, it returns true.
Any ideas? It is entirely possible that I’m going in the wrong direction
and maybe do not need activeldap or maybe I’m just missing something
important. If anyone can help me, I’d really appreciate it. I’m fairly
new at this, so please be specific if you have a solution. Thanks!