redmine_omniauth_saml icon indicating copy to clipboard operation
redmine_omniauth_saml copied to clipboard

undefined method `alias_method_chain' for User

Open alex-3sr opened this issue 6 years ago • 4 comments

Hi,

I'm trying to install the plugin on a Redmine 4.0 but when after cloning GIT project, I run RAILS_ENV=production rake redmine:plugins and I got this error

(in /opt/bitnami/apps/redmine/htdocs) rake aborted! NoMethodError: undefined method alias_method_chain' for User (call 'User.connection' to establish a connection):Class Did you mean? alias_method /opt/bitnami/apps/redmine/htdocs/plugins/redmine_omniauth_saml/lib/redmine_omniauth_saml/user_patch.rb:29:in class:User' /opt/bitnami/apps/redmine/htdocs/plugins/redmine_omniauth_saml/lib/redmine_omniauth_saml/user_patch.rb:3:in <top (required)>' /opt/bitnami/apps/redmine/htdocs/plugins/redmine_omniauth_saml/init.rb:4:in <top (required)>' /opt/bitnami/apps/redmine/htdocs/lib/redmine/plugin.rb:173:in block in load' /opt/bitnami/apps/redmine/htdocs/lib/redmine/plugin.rb:164:in each' /opt/bitnami/apps/redmine/htdocs/lib/redmine/plugin.rb:164:in load' /opt/bitnami/apps/redmine/htdocs/config/initializers/30-redmine.rb:21:in <top (required)>' /opt/bitnami/apps/redmine/htdocs/config/environment.rb:14:in <top (required)>' /opt/bitnami/apps/redmine/htdocs/lib/tasks/redmine.rake:57:in block (2 levels) in <top (required)>' Tasks: TOP => redmine:plugins:migrate => environment (See full trace by running task with --trace)

Ruby version -> ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-linux]

Thank you for your help, Alexandre

alex-3sr avatar Feb 18 '19 18:02 alex-3sr

same issue here, redmine 4.0.1 on debian 9, ruby 2.3 , did you find a solution ??? Thanks !

PS : had no problem with redmine 3.3 from the debian packages ...

pierro78 avatar Mar 05 '19 12:03 pierro78

same issue here on debian 9, ruby 2.3 , did you find a solution ??? Thanks ! PS : had no problem with redmine 3.3 from the debian packages ...

Hi, nope still have no solution :( I tried an another plugin who work lees or more : https://github.com/Gucin/redmine_omniauth_azure

alex-3sr avatar Mar 05 '19 12:03 alex-3sr

+1 I'm not Ruby export but maybe there is a quickfix ?

rroblik avatar Mar 29 '19 13:03 rroblik

With Rails 5.0 the use of alias_method_chain is deprecated. Someone has to rewrite the plugin and use "prepend" to include the code instead. Further info: https://www.justinweiss.com/articles/rails-5-module-number-prepend-and-the-end-of-alias-method-chain/

ibotex avatar Apr 03 '19 13:04 ibotex