上次部署完Redmine,登陆后,进入个人页面或设置中,就会提示500 Internal error错误:
Internalerror Anerroroccurredonthepageyouweretryingtoaccess. IfyoucontinuetoexperienceproblemspleasecontactyourRedmineadministratorforassistance. IfyouaretheRedmineadministrator,checkyourlogfilesfordetailsabouttheerror.
但首页等地方,却没有问题,翻阅资料查出可能是language的问题
cd/var/www/redmine vimapp/helpers/application_helper.rb
定位到这段代码
deflang_options_for_select(blank=true) (blank?[["(auto)",""]]:[])+languages_options end
替换成
deflang_options_for_select(blank=true) (blank?[["(auto)",""]]:[])+valid_languages.collect{|lang|[ll(lang.to_s,:general_lang_name),lang.to_s]}.sort{|x,y|x.last<=>y.last} end
最后重启下httpd
systemctlrestarthttpd.service
再次访问网页,错误消失。
原文链接:https://www.f2er.com/centos/375995.html