Jruby-ldap with Rails 3?

Hello,

I’m trying to use jruby-ldap in a rails 3 app running on jruby, and it
appears that jruby-ldap is failing to load. I do not get any actual
error on the require statement, and it returns nil - which appears to be
the norm from what I can tell. However as soon as I try to access one of
the constants that jruby-ldap is supposed to define, I get:

 uninitialized constant FooController::LDAP

This is a vanilla app built for the sole purpose of testing jruby-ldap
in rails3. The equivalent test apps for jruby-ldap/rails2 and MRI
ruby-ldap/rail3 both work properly.

Is there a trick to requiring a lib in Rails 3, or is jruby-ldap not
ready for Rails 3 yet?

Thanks,
Avram

try using
::LDAP
instead of LDAP

regards Kristian

On Fri, Aug 13, 2010 at 5:46 PM, Avram D. [email protected]
wrote:

This is a vanilla app built for the sole purpose of testing jruby-ldap


To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


Kristian Meier + Saumya Sharma + Sanuka Meier
Vadakkethu House,
Edayanmula West PO - 689532,
Pathanamthitta District, Kerala, INDIA

tel: +91 468 2319577

protect your privacy while searching the net: www.ixquick.com

       =
      q(--)p
      '
) (`
      /
     _(<  / )
   (
__|
/__)


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Actually, we got it working - the problem was that b/c of the way we
have our other gems set up, we needed to do “bundle install
path/to/gems” instead of just “bundle install.”

Thanks

Avram D. wrote:

Actually, we got it working - the problem was that b/c of the way we
have our other gems set up, we needed to do “bundle install
path/to/gems” instead of just “bundle install.”

Thanks

Ok, I spoke too soon. It only works during the first request after
requiring the lib. After that, we get the same error, “uninitialized
constant FooController::LDAP” - or if we prefix the calls with ‘::’ then
we get

    uninitialized constant LDAP

Currently to make it work, I have to do " require ‘ldap’ " in the
methods themselves so that it gets loaded at the beginning of every
request. It would be nice if anybody had any insight on what is going on
here…