Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

undefined method `alias_method_chain' for User #42

Open
alex-3sr opened this issue Feb 18, 2019 · 4 comments
Open

undefined method `alias_method_chain' for User #42

alex-3sr opened this issue Feb 18, 2019 · 4 comments

Comments

@alex-3sr
Copy link

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

@pierro78
Copy link

pierro78 commented Mar 5, 2019

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 ...

@alex-3sr
Copy link
Author

alex-3sr commented Mar 5, 2019

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

@rroblik
Copy link

rroblik commented Mar 29, 2019

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

@ibotex
Copy link

ibotex commented Apr 3, 2019

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/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants