Aug 13, 2012

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/<project>/issues" for 172.20.111.27 at 2012-08-13
15:57:37 +0700
Processing by IssuesController#index as HTML
Parameters: {"project_id"=>"<project>"}
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: <p class="nodata"><%= l(:label_no_data) ></p>
58: < else >
59: <= render :partial => 'issues/list', :locals => {:issues => @issues,
:query => @query} >
60: <p class="pagination"><= pagination_links_full @issue_pages,
@issue_count ></p>
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]#

--
Best Regards,
Nguyen Hung Vu [aka: NVH] ( in Vietnamese: Nguyễn Vũ Hưng )
vuhung16plus{remove}@gmail.dot.com , YIM: vuhung16 , Skype:
vuhung16plus, twitter: vuhung, MSN: vuhung16.
http://www.facebook.com/nguyenvuhung
Nguyễn Vũ Hưng's blog on Free and Open Source:
http://nguyenvuhungvietnam.wordpress.com/
Học tiếng Nhật: http://hoc-tiengnhat.blogspot.com/
Vietnamese LibreOffice: http://libo-vi.blogspot.com/
Mozilla & Firefox tiếng Việt: http://mozilla-vi.blogspot.com/

Disclaimer: When posted to social networking groups include, but not limited Linux Users' Groups,
Free and Open Sources forums, mailing lists, the above is my personal opinion and is *not*
the opinion of my employer(s), associations and/or groups I join.

No comments: