升级后错误gitlab profile500错误
困扰我好久的bug,升级后gitlab打开个人资料界面一直报500错误,之前没理会,也不需要管他,现在需要给别人开账号,不得不抽出时间来处理了,经过各种探索,终于找到了正宗的解决办法,希望对您有所帮助
跟踪日志
gitlab-ctl tail
gitlab14.2.3 错误详情
ActionView::Template::Error (undefined method `pronunciation' for #<UserDetail:0x00007f453a2c3018>
Did you mean? pronouns_change):
98: = f.text_field :id, class: 'gl-form-input', readonly: true, label: s_('Profiles|User ID'), wrapper: { class: 'col-md-3' }
99:
100: = f.text_field :pronouns, class: 'input-md gl-form-input', help: s_("Profiles|Enter your pronouns to let people know how to refer to you")
101: = f.text_field :pronunciation, class: 'input-md gl-form-input', help: s_("Profiles|Enter how your name is pronounced to help people address you correctly")
102: = render_if_exists 'profiles/email_settings', form: f
103: = f.text_field :skype, class: 'input-md gl-form-input', placeholder: s_("Profiles|username")
104: = f.text_field :linkedin, class: 'input-md gl-form-input', help: s_("Profiles|Your LinkedIn profile name from linkedin.com/in/profilename")
原因:升级后数据库差异导致,
解决办法:手动升级数据库
# 数据库关系升级
gitlab-rake db:migrate
app/models/user.rb:315:in `pronunciation’
参考文档:https://blog.csdn.net/weixin_34356310/article/details/92871195
版权声明:本文为wuqingsssss原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。