gpt4 book ai didi

mysql - RoR 和 redmine 设置西里尔字母

转载 作者:行者123 更新时间:2023-11-30 00:48:03 25 4
gpt4 key购买 nike

我想为我糟糕的英语道歉。

当用户选择英语以外的语言时。对我来说这是保加利亚语。我遇到错误 500 内部错误。

这是系统信息:

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 语言环境

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=

错误日志文件:

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'

我尝试解决本地化问题。不幸的是,我发现的结果并没有帮助。请原谅我提问,但我在 RoR 方面有足够的经验

最佳答案

关于mysql - RoR 和 redmine 设置西里尔字母,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21207184/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com