The recent update introduced some changes that lead bundler (executed e.g. to generate secret tokens or some such) to fail, like so: [!] There was an error parsing `Gemfile`: You cannot specify the same gem twice with different version requirements. You specified: net-ldap (>= 0) and net-ldap (>= 0.12.0). Bundler cannot continue. # from /usr/local/www/redmine/Gemfile:94 # ------------------------------------------- # Dir["#{File.dirname(__FILE__)}/bundler.d/*.rb"].each do |bundle| > self.instance_eval(Bundler.read_file(bundle)) # end # ------------------------------------------- This is because the net-ldap dependency introduced in the Gemfile in line 29, https://svnweb.freebsd.org/ports/head/www/redmine/files/patch-Gemfile?view=markup#l29, and the one introduced through code in line 84 of that Gemfile, plus https://svnweb.freebsd.org/ports/head/www/redmine/files/ldap.rb?view=markup being moved into bundler.d/ have conflicting version numbers and confuse bundler. It might be a good idea to patch out the optional dependency on net-ldap
This seems to be a duplicate of: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211276 By the way: can you test the attached patch/update in the other PR? I need some feedback ;)
Fix committed in r422934 (typod the PR number).
This problem is occurring again. [!] There was an error parsing `Gemfile`: You cannot specify the same gem twice with different version requirements. You specified: net-ldap (~> 0.12) and net-ldap (>= 0.12.0). Bundler cannot continue.
Created attachment 193897 [details] redmine ldap fix What is the point of having the ldap gem listed in Gemfile if it's also included by the ldap.rb that gets installed when you choose the LDAP option? I think this patch should fix it which is what I have to do on my Redmine server: remove ldap gem from Gemfile completely.
(In reply to Mark Felder from comment #4) ldap was re-added to Gemfile in r430439. https://svnweb.freebsd.org/ports/head/www/redmine/files/patch-Gemfile?r1=423958&r2=430439 The patch looks good to me.
This breaks the port: [ E 2018-06-09 22:22:27.5941 84452/T15 age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /usr/local/www/redmine: The application encountered the following error: No such file to load -- net/ldap (LoadError) This is because of lines 18 and 19 of /usr/local/www/redmine/app/models/auth_source_ldap.rb: require 'net/ldap' require 'net/ldap/dn' You want to either patch that file when disabling LDAP or remove the option to disable LDAP. I don't really see the need to disable LDAP, it's under 3mb.
(In reply to Steve Wills from comment #6) Ok, so this breaks it when LDAP is disabled only? I didn't test that scenario. I'd be OK with including this patch and enabling LDAP by default which means removing it as a port option entirely.
(In reply to Mark Felder from comment #7) Works for me.
Created attachment 194226 [details] redmine ldap fix I believe the patch should look like this then, correct? We leave the standard ldap declaration in Gemfile and stop dropping a file in bundler.d ?
A commit references this bug: Author: swills Date: Thu Jun 14 22:33:11 UTC 2018 New revision: 472402 URL: https://svnweb.freebsd.org/changeset/ports/472402 Log: www/redmine: remove ldap option This fixes the issues with redmine depending on net-ldap twice. PR: 213085 Submitted by: feld Reported by: xmj Changes: head/www/redmine/Makefile head/www/redmine/files/ldap.rb head/www/redmine/pkg-plist
Committed, thanks!
A commit references this bug: Author: feld Date: Fri Jun 15 13:13:07 UTC 2018 New revision: 472444 URL: https://svnweb.freebsd.org/changeset/ports/472444 Log: MFH: r472402 www/redmine: remove ldap option This fixes the issues with redmine depending on net-ldap twice. PR: 213085 Submitted by: feld Reported by: xmj Changes: _U branches/2018Q2/ branches/2018Q2/www/redmine/Makefile branches/2018Q2/www/redmine/files/ldap.rb branches/2018Q2/www/redmine/pkg-plist