ArgumentError: You tried to define an enum named "whats_new_variant" on the model "ApplicationSetting", but this will generate a instance method "whats_new_variant_all_tiers?", which is already defined by another enum.
Hello.
I am using Gitlab-CE with docker at my university.
Today I updated from 16.9.1-ce.0 to 17.0.0-ce.0.
However, gitlab-rails is not running normally with the following errors.
1)
/opt/gitlab/embedded/lib/ruby/gems/3.1.0/gems/activerecord-7.0.8/lib/active_record/enum.rb:301:in `raise_conflict_error': You tried to define an enum named “whats_new_variant” on the model “ApplicationSetting”, but this will generate an instance method “whats_new_variant_all_tiers?”, which is already defined by another enum. (ArgumentError)
2)
==> /var/log/gitlab/gitlab-workhorse/current <==
{“correlation_id”:“”,“duration_ms”:0,“error”:“badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: no such file or directory”,“level”:“error”,“method”:“GET”,“msg”:“”,“time”:“2024-05-20T13:01:03Z”,“uri”:“”}
3)
==> /var/log/gitlab/postgresql/current <==
2024-05-20_13:01:05.22555 ERROR: invalid page in block 129 of relation base/16386/1259
Referring to other questions and answers, I tried the following command.
# docker exec -it gitlab update-permissions
# docker exec -it gitlab gitlab-rake cache:clear
However, I get the same ArgumentError.
ArgumentError: You tried to define an enum named “whats_new_variant” on the model “ApplicationSetting”, but this will generate an instance method “whats_new_variant_all_tiers?”, which is already defined by another enum.
I have the source code of the students stored, so I really need to save the data.
Please help. Thanks.
[Spec]
# docker -v
Docker version 24.0.6, build ed223bc
# docker exec -it gitlab gem list bundler
*** LOCAL GEMS ***
bundler (default: 2.5.10)
Edited by 김광준