ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Upgrade from ruby-net-ldap to net-ldap gem (Bug #258)


Added by Denise Mauldin at 2011-03-05 01:43 am. Updated at 2011-11-25 07:56 pm.


Status:Closed Start date:2011-03-05
Priority:Normal Due date:
Assignee:Felix Schäfer % Done:

0%

Category:Libraries
Target version:2.5.0
Remote issue URL: Affected version:

Description

The LDAP authentication in Chiliproject on ruby 1.9.2 doesn't work right now because an old version of Net::LDAP is installed. If you just delete the ruby-net-ldap-0.04 directory from vendor/plugins and 'gem install net-ldap', then the LDAP authentication works and no longer gives a 'Unable to connect (can't convert Net::LDAP::LdapError into String)' error.


Related issues

related to Feature #290: Add bundler Closed 2011-03-18

Associated revisions

Revision 166d65b2
Added by Felix Schäfer at 2011-11-25 08:54 pm

[#258] Unvendor net-ldap

History

Updated by Felix Schäfer at 2011-03-05 08:21 am

Denise Mauldin wrote:

The LDAP authentication in Chiliproject on ruby 1.9.2 doesn't work right now

Thanks for reporting, one thing more to update for 1.9 support :-)

I've updated the subject though, as the bundled gem is ruby-net-ldap and the one you are referring to is ruby-ldap (essentially the same maintainer and functionality, but ruby-ldap seems to be maintained wheres ruby-net-ldap hasn't been since 2006).

  • Target version set to 2.0.0
  • Subject changed from Old version of Net::LDAP included in vendor/plugins to Upgrade from ruby-net-ldap to ruby-ldap gem

Updated by Eric Davis at 2011-03-18 05:55 pm

I'm removing this from the 2.0.0 target until someone commits to upgrading it.

  • Target version deleted (2.0.0)
  • Category set to Libraries

Updated by Felix Schäfer at 2011-03-19 09:32 am

I'll see if the updated version works with bundler, I'll add it back to 2.0.0 only if I get it done in time though so that it isn't a blocker.

  • Assignee set to Felix Schäfer

Updated by Eric Davis at 2011-03-19 02:15 pm

Thanks Felix. When (or if) you decide to upgrade, let me know. I have a few plugins and hacks I can test out too.

Updated by Felix Schäfer at 2011-03-19 07:43 pm

(I edited the title to show the correct gem names).

#290 seems to be coming along nicely, and from what I gathered the easiest fix/solution for this would be to pull out ruby-net-ldap and add net-ldap to bundler/the gemfile, so I'll wait on it and do this afterwards.

  • Subject changed from Upgrade from ruby-net-ldap to ruby-ldap gem to Upgrade from ruby-net-ldap to net-ldap gem

Updated by Eric Davis at 2011-07-12 09:58 pm

I just finished a huge debugging session on a client's server to fix an unrelated bug. As part of it I removed the vendored plugin and switched to the net-ldap gem. I didn't run the unit tests but the gem just dropped right in without any further changes.

Felix: are you going to have time to look at this in the next few weeks? If not, I'd be happy to test the gem for release with 2.1.0.

Updated by Felix Schäfer at 2011-07-13 09:54 am

Eric Davis wrote:

Felix: are you going to have time to look at this in the next few weeks? If not, I'd be happy to test the gem for release with 2.1.0.

I'd pretty much say the net-ldap gem is the successor to ruby-net-ldap, in fact most links on the ruby-net-ldap homepage lead to pages on net-ldap :-) Anyway, if the CI runs the LDAP tests (asked Gregor about that, no answer yet), I'll remove the vendored one and add net-ldap to it, and consider this solved if the tests pass.

(can't test it on my install as I patched it to use another gem)

Updated by Eric Davis at 2011-07-13 05:27 pm

If the problem is running the tests, I can switch them. I have LDAP configured locally for all of the tests.

Having LDAP work on the CI would be nice but might be difficult if we ever change the LDAP "fixtures" since the tests all connect to the same LDAP server. I'm okay not having CI check LDAP if it's going to be difficult to configure.

Updated by Holger Just at 2011-09-13 12:26 pm

There seem to exist a plethora of LDAP libraries out there. I think we should investigate here and find the most common one (and probably the one used by Devise):

Name Last Release Notes
ruby-net-ldap 2006-10-15
ruby-ldap 2010-03-14 seems to be the "official" successor of ruby-net-ldap
net-ldap 2011-03-26 derived from Net::LDAP

Finally, there's https://github.com/ruby-ldap/ruby-net-ldap which seems to be another place for net-ldap.

Updated by Tammo Tjarks at 2011-11-10 01:31 pm

Something maybe to mention:
I needed to add the line:

gem 'net-ldap'

in
app/models/auth_source_ldap.rb

and add the line

gem "net-ldap", ">= 0.2.2" 

to the Gemfile to get it to work.

Updated by Felix Schäfer at 2011-11-25 07:09 pm

Tammo Tjarks wrote:

Something maybe to mention:
I needed to add the line:
[...]

You shouldn't need to explicitly require the gem with gem 'net-ldap' if it's in the Gemfile.

  • Status changed from Open to Ready for review

Updated by Felix Schäfer at 2011-11-25 07:56 pm

Pushed in 166d65b, thanks for all the input.

  • Target version set to 2.5.0
  • Status changed from Ready for review to Closed

Also available in: Atom PDF