thorin / redmine_ldap_sync

[UNMAINTAINED] A redmine plugin to synchronize both users and groups with an ldap server
http://www.redmine.org/plugins/redmine_ldap_sync
GNU General Public License v3.0
140 stars 129 forks source link

Installing on redmine 3.3.1 Ubuntu 16.04 ruby 2.3 #191

Closed timroh closed 7 years ago

timroh commented 7 years ago

Hi,

i'm currently trying to set up the plugin with easy redmine on redmine version 3.3.1.stable ruby: 2.3.1-p112 rails: 4.2.7.1

i cloned the project into the redmine/plugins folder, if i now try to update the database via:

rake redmine:plugins:migrate RAILS_ENV=production

i get the following error:

rake redmine:plugins:migrate RAILS_ENV=production
(in /www/redmine)
rake aborted!
NameError: uninitialized constant LdapSync
/www/redmine/plugins/redmine_ldap_sync/init.rb:9:in `block in <top (required)>'
/www/redmine/plugins/easyproject/init.rb:146:in `instance_eval'
/www/redmine/plugins/easyproject/init.rb:146:in `register'
/www/redmine/plugins/redmine_ldap_sync/init.rb:3:in `<top (required)>'
/www/redmine/plugins/easyproject/init.rb:404:in `load_plugin_init'
/www/redmine/plugins/easyproject/init.rb:390:in `block in load_all_plugins'
/www/redmine/plugins/easyproject/init.rb:389:in `each'
/www/redmine/plugins/easyproject/init.rb:389:in `load_all_plugins'
/www/redmine/plugins/easyproject/init.rb:358:in `init!'
/www/redmine/plugins/easyproject/init.rb:409:in `<top (required)>'
/www/redmine/config/initializers/22-change_plugins_order.rb:15:in `load'
/www/redmine/config/initializers/30-redmine.rb:21:in `<top (required)>'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/var/lib/gems/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:166:in `instrument'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:651:in `load_config_initializer'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `each'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `each'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/application.rb:352:in `initialize!'
/www/redmine/config/environment.rb:14:in `<top (required)>'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/application.rb:328:in `require_environment!'
/var/lib/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/var/lib/gems/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)

I already tried reinstalling, i installed a few other gems and so on. Nothing worked until now.

Thanks in advance for any advise.

thorin commented 7 years ago

From the stack trace there seems to be a conflict between ldap sync and easyproject.

Could you try running it without easyproject just to confirm?

thorin commented 7 years ago

EasyProject overrides the normal loading of the plugins... You probably can make ldap_sync work by replacing, on the file init.rb, the line:

version LdapSync::VERSION.to_s

with:

version '2.0-custom'

But the easyproject team could have a better look at this.

timroh commented 7 years ago

Wow, thanks for the fast answer. After changing the init.rb the rake went well and i now have the plugin installed.

Thanks a bunch. :)