On centos, redmine2.3.0 click my account and my personal settings for a solution with a 500 error. recently, the company wants to upgrade redmine to version 2.3.0, which was previously set up, so the building process is still smooth, however, a problem was found after the establishment. after logging on to the background, click my account and... on centos, redmine2.3.0 click my account and my personal settings for a solution with a 500 error. recently, the company wants to upgrade redmine to version 2.3.0, which was previously set up, so the building process is still smooth, however, an error was found after the setup. after logging on to the background, click "my account" and "manage"-"set" to report an error. The page prompts Internal error. The title of the page is redmine 500 error. The error message in log is as follows. [Php] Processing by MyController # account as HTML Current user: test (id = 3) Rendered my/account.html. erb within layouts/base (8.6 ms) Completed 500 Internal Server Error in 16 ms ActionView: Template: Error (wrong number of arguments (2 for 1): 16:
<% = F. text_field: firstname,: required => true %>
17:
<% = F. text_field: lastname,: required => true %>
18:
<% = F. text_field: mail,: required => true %>
19:
<% = F. select: language, lang_options_for_select %>
20: <% if Setting. openid? %> 21:
<% = F. text_field: identity_url %>
22: <% end %> lib/redmine/i18n. rb: 95: in 'ages _ options' app/helpers/application_helper.rb: 974: in 'Lang _ options_for_select 'app/views/my/account.html. erb: 19: in '_ app_views_my_account_html_erb ___ 278591561379616683068' app/helpers/application_helper.rb: 989: in 'labeled _ form_for 'app/views/my/account.html. erb: 9: in '_ app_views_my_account_html_erb ___ 278591561379616683068' someone said on the Internet that this problem occurs after ruby is upgraded from 1.8.7 to 1.9.3. You can solve the problem. However, redmine2.3.0 supports ruby 1.8.7, in addition, after I installed ruby 1.9.3, there were a bunch of problems in the environment (because ruby already has two sets on this machine, one of which does not know who built it, the old version is unavailable, so I am not compatible with various conflicts after the installation), so I gave up this solution. if you are interested, try it. Later, I found another solution and finally solved my problem, as shown below for your reference. [Php] # cd/var/www/redmine # vi app/helpers/application_helper.rb find the following content and delete or add it accordingly. [Php] def lang_options_for_select (blank = true) (blank? [["(Auto)", ""]: []) + languages_options // delete this row (blank? [["(Auto)", ""]: []) + // add the valid_languages.collect {| lang | [ll (lang. to_s,: general_lang_name), lang. to_s]}. sort {| x, y | x. last <=> y. last} // add this line end [php] # vi lib/redmine/i18n. find the following items and delete them all. [Php] # Returns an array of statements ages names and code sorted by names, example: # [["Deutsch", "de"], ["English ", "en"]...] # The result is cached to prevent from loading all translations files. def required ages_options ActionController: Base. cache_store.fetch "i18n/languages_options" do valid_languages.map {| lang | [ll (lang. to_s,: general_lang_name), lang. to_s]}. sort {| x, y | x. first <=> y. first} end End [php] # vi test/unit/lib/redmine/i18n_test.rb find the following content and delete all. [Php] def test_cmdages_options options = cmdages_options assert options. is_a? (Array) assert_equal valid_languages.size, options. size assert_nil options. detect {| option |! Option. is_a? (Array)} assert_nil options. detect {| option. size! = 2} assert_nil options. detect {| option |! Option. first. is_a? (String) |! Option. last. is_a? (String)} assert_include ["English", "en"], options end, restart and try again. all the problems will be solved, BINGO !!!