redmine_omniauth_saml
redmine_omniauth_saml copied to clipboard
undefined method `alias_method_chain' for User
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:inblock in load' /opt/bitnami/apps/redmine/htdocs/lib/redmine/plugin.rb:164:in
each' /opt/bitnami/apps/redmine/htdocs/lib/redmine/plugin.rb:164:inload' /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
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 ...
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
+1 I'm not Ruby export but maybe there is a quickfix ?
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/