上次部署完Redmine,登陆后,进入个人页面或设置中,就会提示500 Internal error错误:
Internal error An error occurred on the page you were trying to access. If you continue to experience problems please contact your Redmine administrator for assistance. If you are the Redmine administrator, check your log files for details about the error.
但首页等地方,却没有问题,翻阅资料查出可能是language的问题
cd /var/www/redmine vim app/helpers/application_helper.rb
定位到这段代码
def lang_options_for_select(blank=true) (blank ? [["(auto)", ""]] : []) + languages_options end
替换成
def lang_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
systemctl restart httpd.service
再次访问网页,错误消失。
本文出自 “雪糕猪” 博客,请务必保留此出处http://icecreampig.blog.51cto.com/648013/1963116
原文地址:http://icecreampig.blog.51cto.com/648013/1963116