user3210305
user3210305

Reputation: 51

RoR and redmine setup cyrillic

I would like to apologize for my bad english.

When the user chooses a different language than English. For me this is Bulgarian. I have error 500 Internal error.

Here's system information:

Environment:
  Redmine version                2.4.2.stable
  Ruby version                   1.9.3-p484 (2013-11-22) [i686-linux]
  Rails version                  3.2.16
  Environment                    production
  Database adapter               Mysql2

MySQL:

+----------------------+-----------------+
| Variable_name        | Value           |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database   | utf8_general_ci |
| collation_server     | utf8_general_ci |
+----------------------+-----------------+
3 rows in set (0.00 sec)

mysql> SHOW VARIABLES LIKE 'character_set%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+

CentOS6 locales

LANG=bg_BG.UTF-8
LC_CTYPE=UTF-8
LC_NUMERIC="bg_BG.UTF-8"
LC_TIME="bg_BG.UTF-8"
LC_COLLATE="bg_BG.UTF-8"
LC_MONETARY="bg_BG.UTF-8"
LC_MESSAGES="bg_BG.UTF-8"
LC_PAPER="bg_BG.UTF-8"
LC_NAME="bg_BG.UTF-8"
LC_ADDRESS="bg_BG.UTF-8"
LC_TELEPHONE="bg_BG.UTF-8"
LC_MEASUREMENT="bg_BG.UTF-8"
LC_IDENTIFICATION="bg_BG.UTF-8"
LC_ALL=

Error log file:

Started GET "/my/account" for IP... at 2014-01-18 20:03:05 +0300
Processing by MyController#account as HTML
  Current user: yipman (id=3)
  Rendered my/account.html.erb within layouts/base (22.4ms)
Completed 500 Internal Server Error in 28.2ms

ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):
    16:   <p><%= f.text_field :firstname, :required => true %></p>
    17:   <p><%= f.text_field :lastname, :required => true %></p>
    18:   <p><%= f.text_field :mail, :required => 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/views/labelled_form_builder.rb:34:in `select'
  app/views/my/account.html.erb:19:in `block in _app_views_my_account_html_erb___159362001__633293848'
  app/helpers/application_helper.rb:977:in `labelled_form_for'
  app/views/my/account.html.erb:9:in `_app_views_my_account_html_erb___159362001__633293848'

I try to localized problems. Unfortunately, what I found as a result did not help. Please excuse me for asking, but I have enough experience with RoR

Upvotes: 0

Views: 363

Answers (1)

Related Questions