On centos redmine2.3.0, click my account and my personal settings to display the 500 Error solution.

Source: Internet
Author: User
Tags redmine

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: <p> <% = f. text_field: firstname,: required => true %> </p> 17: <p> <% = f. text_field: lastname,: required => true %> </p> 18: <p> <% = f. text_field: mail,: requ Ired => true %> </p> 19: <p> <% = f. select: language, lang_options_for_select %> </p> 20: <% if Setting. openid? %> 21: <p> <% = f. text_field: identity_url %> </p> 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 __278 591561316616683068 'Someone said on the Internet that this problem can be solved after ruby is upgraded from 1.8.7 to 1.9.3. 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 !!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.