some mistake after authorization

Added by Евгений Евгений 11 months ago

NameError (undefined local variable or method `twofa_scheme' for #<User:0x00007ff45926e0d0>
Did you mean? twofa_active?):

debian 10
redmine 4.1.1
ruby-2.6.5

  1. tail -f /var/www/html/log/production.log
    @Completed 500 Internal Server Error in 45ms (ActiveRecord: 6.2ms)

NameError (undefined local variable or method `twofa_scheme' for #<User:0x00007f3058e8c788>
Did you mean? twofa_active?):

app/models/user.rb:406:in `twofa_active?'
app/controllers/account_controller.rb:320:in `password_authentication'
app/controllers/account_controller.rb:306:in `authenticate_user'
app/controllers/account_controller.rb:40:in `login'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'@

Replies (5)

RE: some mistake after authorization - Added by Евгений Евгений 11 months ago

решение

#rake db:migrate RAILS_ENV=production

RE: some mistake after authorization - Added by Moisés Bites 8 months ago

I have the same error. Migrating from 3.1.1 to 4.2.1. This problem occurs after login.

App 121 output: I, [2021-05-25T13:00:25.852113 #121]  INFO -- :   Current user: anonymous
App 121 output: I, [2021-05-25T13:00:25.899902 #121]  INFO -- : Completed 500 Internal Server Error in 50ms (ActiveRecord: 3.0ms)
App 121 output: F, [2021-05-25T13:00:25.900283 #121] FATAL -- :   
App 121 output: F, [2021-05-25T13:00:25.900401 #121] FATAL -- : NameError (undefined local variable or method `twofa_scheme' for #<User:0x00007f00e0be49b0>
App 121 output: Did you mean?  twofa_active?):
App 121 output: F, [2021-05-25T13:00:25.900420 #121] FATAL -- :   
App 121 output: F, [2021-05-25T13:00:25.900436 #121] FATAL -- : app/models/user.rb:406:in `twofa_active?'
App 121 output: app/controllers/account_controller.rb:321:in `password_authentication'
App 121 output: app/controllers/account_controller.rb:307:in `authenticate_user'
App 121 output: app/controllers/account_controller.rb:41:in `login'
App 121 output: lib/redmine/sudo_mode.rb:61:in `sudo_mode'

RE: some mistake after authorization - Added by Евгений Евгений 8 months ago

Hello, did you try this?

  • rake db:migrate RAILS_ENV=production

RE: some mistake after authorization - Added by Moisés Bites 8 months ago

Hello, thank you very much.

I am using a redmine docker image. So, I did now, and it's working.

RE: some mistake after authorization - Added by Mahyar Ahmadpour-B. 14 days ago

Moisés Bites wrote:

Hello, thank you very much.

I am using a redmine docker image. So, I did now, and it's working.

SORRY to ask! I am also using a dokcerized version of RedMine and PostgreSQL. Where should I run this command: rake db:migrate RAILS_ENV=production ?

(1-5/5)