southbridgeio / redmine_2fa

Two-factor (sms/telegram) authentication for Redmine
https://southbridge.io
MIT License
42 stars 17 forks source link

Issue while installing redmine_2fa on Ubuntu 16.04.1 LTS with Redmine 3.2.1 #20

Closed efazenda closed 7 years ago

efazenda commented 7 years ago

Dear Developpers,

I have an issue while installing redmine_2fa on Ubuntu 16.04.1 LTS with Redmine 3.2.1 with Ruby 2.3.

I have followed the steps on you're README, and when it comes the times to run the command " bin/rake redmine:plugins:migrate" from the path /usr/share/redmine/ it generate the following error :

bin/rake redmine:plugins:migrate rake aborted! NoMethodError: undefined method 'has_one_time_password' for #<Class:0x000000053bef98> Did you mean? has_secure_password /usr/share/redmine/lib/plugins/redmine_2fa/lib/redmine_2fa/patches/user_patch.rb:12:in 'block in included' /usr/share/redmine/lib/plugins/redmine_2fa/lib/redmine_2fa/patches/user_patch.rb:9:in 'class_eval' /usr/share/redmine/lib/plugins/redmine_2fa/lib/redmine_2fa/patches/user_patch.rb:9:in 'included' /usr/share/redmine/lib/plugins/redmine_2fa/lib/redmine_2fa/patches/user_patch.rb:62:in 'include' /usr/share/redmine/lib/plugins/redmine_2fa/lib/redmine_2fa/patches/user_patch.rb:62:in '<top (required)>' /usr/share/redmine/lib/plugins/redmine_2fa/init.rb:12:in 'block (4 levels) in <top (required)>' /usr/share/redmine/lib/plugins/redmine_2fa/init.rb:11:in 'each' /usr/share/redmine/lib/plugins/redmine_2fa/init.rb:11:in 'block (3 levels) in <top (required)>' /usr/share/redmine/lib/plugins/redmine_2fa/init.rb:10:in 'each' /usr/share/redmine/lib/plugins/redmine_2fa/init.rb:10:in 'block (2 levels) in <top (required)>' /usr/share/redmine/config/environment.rb:14:in '<top (required)>' Tasks: TOP => redmine:plugins:migrate => environment (See full trace by running task with --trace)

I have cloned the repository in the /usr/share/redmine/lib/plugins directory and run the "bundle" command without issues.

My setup is the following :

DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

ruby --version ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]

Could you please have a look ? Maybe i missed one step ?

Thank You in advance and have a nice day.

Regards, Edouard Fazenda.

arturtr commented 7 years ago

Do you run bundle install before it?

пн, 19 дек. 2016, 18:36 Edouard Fazenda notifications@github.com:

Dear Developpers,

I have an issue while installing redmine_2fa on Ubuntu 16.04.1 LTS with Redmine 3.2.1 with Ruby 2.3.

I have followed the steps on you're README, and when it comes the times to run the command " bin/rake redmine:plugins:migrate" from the path /usr/share/redmine/ it generate the following error :

bin/rake redmine:plugins:migrate rake aborted! NoMethodError: undefined method 'has_one_time_password' for # Did you mean? has_secure_password /usr/share/redmine/lib/plugins/redmine_2fa/lib/redmine_2fa/patches/user_patch.rb:12:in 'block in included' /usr/share/redmine/lib/plugins/redmine_2fa/lib/redmine_2fa/patches/user_patch.rb:9:in 'class_eval' /usr/share/redmine/lib/plugins/redmine_2fa/lib/redmine_2fa/patches/user_patch.rb:9:in 'included' /usr/share/redmine/lib/plugins/redmine_2fa/lib/redmine_2fa/patches/user_patch.rb:62:in 'include' /usr/share/redmine/lib/plugins/redmine_2fa/lib/redmine_2fa/patches/user_patch.rb:62:in '<top (required)>' /usr/share/redmine/lib/plugins/redmine_2fa/init.rb:12:in 'block (4 levels) in <top (required)>' /usr/share/redmine/lib/plugins/redmine_2fa/init.rb:11:in 'each' /usr/share/redmine/lib/plugins/redmine_2fa/init.rb:11:in 'block (3 levels) in <top (required)>' /usr/share/redmine/lib/plugins/redmine_2fa/init.rb:10:in 'each' /usr/share/redmine/lib/plugins/redmine_2fa/init.rb:10:in 'block (2 levels) in <top (required)>' /usr/share/redmine/config/environment.rb:14:in '<top (required)>' Tasks: TOP => redmine:plugins:migrate => environment (See full trace by running task with --trace)

I have cloned the repository in the /usr/share/redmine/lib/plugins directory and run the "bundle" command without issues.

My setup is the following :

DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

ruby --version ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]

Could you please have a look ? Maybe i missed one step ?

Thank You in advance and have a nice day.

Regards, Edouard Fazenda.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/centosadmin/redmine_2fa/issues/20, or mute the thread https://github.com/notifications/unsubscribe-auth/AAv1PpOA7zoPcXX1W7ZW3D-U4xr-W3XWks5rJkIfgaJpZM4LQe7Y .

efazenda commented 7 years ago

I have run "bundle" not "bundle install" as said in the README : https://github.com/centosadmin/redmine_2fa#installation

arturtr commented 7 years ago

Please attache Gemfile.lock

arturtr commented 7 years ago

For some reasons gems from plugin are not installed.

Gemfile.lock should contain

active_model_otp
rqrcode

after bundle install (bundle is alias for this command).

The problem is not in the plugin.