Redmine: fixed: ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)

Solution:
/var/www/redmine/config/database.yml

production:
# old adapter: mysql

# new: changed from ‘mysql’ to ‘mysql2’
adapter: mysql2
database: redmine
host: localhost
username: redmine
password:
encoding: utf8

Environment:
CentOS 6.3, Redmine 2.0.3,
ruby 1.9.3p194 (2012-04-20) [i686-linux]
gem 1.8.23

Error:
ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)

Action:
ruby script/rails server webrick -e production

Redmine console log:
Started GET “/projects//issues” for 172.20.111.27 at 2012-08-13 15:57:37 +0700 Processing by IssuesController#index as HTML
Parameters: {“project_id”=>””}
Rendered queries/_filters.html.erb (21.9ms)
Rendered queries/_columns.html.erb (2.0ms)
Rendered issues/_list.html.erb (118.7ms)
Rendered issues/index.html.erb within layouts/base (148.7ms) Completed 500 Internal Server Error in 240ms

ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8): 57:

<%= l(:label_no_data) >

58: < else >
59: <= render :partial => ‘issues/list’, :locals => {:issues => @issues, :query => @query} >
60:

<= pagination_links_full @issue_pages, @issue_count >

61: < end >
62:
63: < other_formats_links do |f| %>
app/views/issues/index.html.erb:60:in `_app_views_issues_index_html_erb__327313672_102555190′ app/controllers/issues_controller.rb:83:in `block (2 levels) in index’ app/controllers/issues_controller.rb:82:in `index’

[root@redmine config]# gem list

*** LOCAL GEMS ***

actionmailer (3.2.6)
actionpack (3.2.6)
activemodel (3.2.6)
activerecord (3.2.6)
activeresource (3.2.6)
activesupport (3.2.6)
arel (3.0.2)
bigdecimal (1.1.0)
builder (3.0.0)
bundler (1.1.5)
coderay (1.0.7)
erubis (2.7.0)
factory_girl (4.0.0)
factory_girl_rails (4.0.0)
hike (1.2.1)
i18n (0.6.0)
io-console (0.3)
journey (1.0.4)
json (1.7.3, 1.5.4)
mail (2.4.4)
metaclass (0.0.1)
mime-types (1.19)
minitest (2.5.1)
mocha (0.12.0)
multi_json (1.3.6)
mysql (2.8.1)
mysql2 (0.3.11)
net-ldap (0.3.1)
polyglot (0.3.3)
prototype-rails (3.2.1)
rack (1.4.1)
rack-cache (1.2)
rack-openid (1.3.1)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.6)
railties (3.2.6)
rake (0.9.2.2)
rdoc (3.12, 3.9.4)
rmagick (2.13.1)
ruby-openid (2.1.8)
shoulda (2.11.3)
simplecov (0.6.4)
simplecov-html (0.5.3)
simplecov-rcov (0.2.3)
sprockets (2.1.3)
thor (0.15.4)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
yard (0.8.2.1)
[root@redmine config]#

Advertisements

Trả lời

Mời bạn điền thông tin vào ô dưới đây hoặc kích vào một biểu tượng để đăng nhập:

WordPress.com Logo

Bạn đang bình luận bằng tài khoản WordPress.com Đăng xuất / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Đăng xuất / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Đăng xuất / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Đăng xuất / Thay đổi )

Connecting to %s