https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292013-03-20T08:01:36ZRedmineRedmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=471272013-03-20T08:01:36ZToshi MARUYAMA
<ul></ul><p>Could you try <a href="http://www.redmine.org/attachments/download/8833/revert-r10844.diff" class="external">revert-r10844.diff</a> in <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Internal Error 500 on "settings" (Closed)" href="https://www.redmine.org/issues/12861#note-12">#12861#note-12</a>?</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=471282013-03-20T08:01:50ZToshi MARUYAMA
<ul><li><strong>Category</strong> changed from <i>Administration</i> to <i>I18n</i></li></ul> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=471502013-03-20T13:58:46ZOndřej Surý
<ul></ul><p>Yep, this helps. I can access all those pages now. Thank you.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=471532013-03-20T14:47:24ZToshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/9324">issue-13520.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/9324/issue-13520.diff">issue-13520.diff</a> added</li></ul><p>Could you try this patch instead of note-1 patch?</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=471782013-03-20T17:11:28ZOndřej Surý
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>Could you try this patch instead of note-1 patch?</p>
</blockquote>
<p>Nope, that doesn't help.</p>
<pre>
Started GET "/my/account" for 109.81.193.205 at 2013-03-20 18:07:19 +0100
Processing by MyController#account as HTML
Current user: oerdnj (id=3)
Rendered my/account.html.erb within layouts/base (124.0ms)
Completed 500 Internal Server Error in 146ms
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 %>
app/views/my/account.html.erb:19:in `block in _app_views_my_account_html_erb__1778295814055381356_47150120'
app/helpers/application_helper.rb:944:in `labelled_form_for'
app/views/my/account.html.erb:9:in `_app_views_my_account_html_erb__1778295814055381356_47150120'
</pre>
<pre>
Started GET "/users/new" for 109.81.193.205 at 2013-03-20 18:08:21 +0100
Processing by UsersController#new as HTML
Current user: oerdnj (id=3)
Rendered users/_mail_notifications.html.erb (1.9ms)
Rendered users/_preferences.html.erb (4.6ms)
Rendered users/_form.html.erb (12.2ms)
Rendered users/new.html.erb within layouts/admin (14.5ms)
Rendered admin/_menu.html.erb (3.8ms)
Rendered layouts/base.html.erb (34.8ms)
Completed 500 Internal Server Error in 59ms
ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):
55: <%= yield :sidebar %>
56: <%= view_layouts_base_sidebar_hook_response %>
57: </div>
58:
59: <div id="content">
60: <%= render_flash_messages %>
61: <%= yield %>
app/views/layouts/base.html.erb:58:in `_app_views_layouts_base_html_erb___3464178119876434098_27342580'
app/views/layouts/admin.html.erb:8:in `_app_views_layouts_admin_html_erb___2226765504173015874_52341820'
</pre>
<pre>
Started GET "/account/register" for 109.81.193.205 at 2013-03-20 18:08:43 +0100
Processing by AccountController#register as HTML
Current user: oerdnj (id=3)
Rendered account/register.html.erb within layouts/base (6.9ms)
Completed 500 Internal Server Error in 52ms
ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):
55: <%= yield :sidebar %>
56: <%= view_layouts_base_sidebar_hook_response %>
57: </div>
58:
59: <div id="content">
60: <%= render_flash_messages %>
61: <%= yield %>
app/views/layouts/base.html.erb:58:in `_app_views_layouts_base_html_erb___3464178119876434098_27342580'
</pre>
<pre>
Started GET "/settings" for 109.81.193.205 at 2013-03-20 18:09:04 +0100
Processing by SettingsController#index as HTML
Current user: oerdnj (id=3)
Rendered settings/_general.html.erb (25.3ms)
Rendered settings/_display.html.erb (87.2ms)
Rendered common/_tabs.html.erb (122.5ms)
Rendered settings/edit.html.erb within layouts/admin (125.9ms)
Completed 500 Internal Server Error in 162ms
ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8):
11:
12: <p><%= setting_select :time_format, Setting::TIME_FORMATS.collect {|f| [::I18n.l(Time.now, :locale => locale, :format => f), f]}, :blank => :label_language_based %></p>
13:
14: <p><%= setting_select :user_format, @options[:user_format] %></p>
15:
16: <p><%= setting_check_box :gravatar_enabled %></p>
17:
app/views/settings/_display.html.erb:14:in `block in _app_views_settings__display_html_erb___74934282724677793_50957240'
app/views/settings/_display.html.erb:1:in `_app_views_settings__display_html_erb___74934282724677793_50957240'
app/views/common/_tabs.html.erb:24:in `block in _app_views_common__tabs_html_erb__2902838862237008963_50128280'
app/views/common/_tabs.html.erb:23:in `each'
app/views/common/_tabs.html.erb:23:in `_app_views_common__tabs_html_erb__2902838862237008963_50128280'
app/helpers/application_helper.rb:271:in `render_tabs'
app/views/settings/edit.html.erb:3:in `_app_views_settings_edit_html_erb__2285893890726478615_47564320'
app/controllers/settings_controller.rb:28:in `index'
</pre> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=471842013-03-20T17:26:19ZToshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/9325">issue-13520-1.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/9325/issue-13520-1.diff">issue-13520-1.diff</a> added</li></ul><p>Could you try this patch instead of note-4 patch?</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=471902013-03-20T18:24:52ZOndřej Surý
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>Could you try this patch instead of note-4 patch?</p>
</blockquote>
<p>Still nothing and the error message still looks same.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=472032013-03-20T22:37:50ZToshi MARUYAMA
<ul></ul><p>Could you add "# encoding: utf-8" at top of lib/redmine/i18n.rb on clean Redmine source (not apply any patches)?</p>
<a name="trunk-23-stable-Copyright-C-2006-2013-Jean-Philippe-Lang"></a>
<h2 >trunk / 2.3-stable (Copyright (C) 2006-2013 Jean-Philippe Lang)<a href="#trunk-23-stable-Copyright-C-2006-2013-Jean-Philippe-Lang" class="wiki-anchor">¶</a></h2>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/lib/redmine/i18n.rb b/lib/redmine/i18n.rb
</span><span class="gd">--- a/lib/redmine/i18n.rb
</span><span class="gi">+++ b/lib/redmine/i18n.rb
</span><span class="p">@@ -1,3 +1,5 @@</span>
<span class="gi">+# encoding: utf-8
+#
</span> # Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
#
</code></pre>
<a name="22-stable-Copyright-C-2006-2012-Jean-Philippe-Lang"></a>
<h2 >2.2-stable (Copyright (C) 2006-2012 Jean-Philippe Lang)<a href="#22-stable-Copyright-C-2006-2012-Jean-Philippe-Lang" class="wiki-anchor">¶</a></h2>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/lib/redmine/i18n.rb b/lib/redmine/i18n.rb
</span><span class="gd">--- a/lib/redmine/i18n.rb
</span><span class="gi">+++ b/lib/redmine/i18n.rb
</span><span class="p">@@ -1,3 +1,5 @@</span>
<span class="gi">+# encoding: utf-8
+#
</span> # Redmine - project management software
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
</code></pre> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=472172013-03-21T07:14:45ZOndřej Surý
<ul></ul><p>Nope :(.</p>
<pre>
Started GET "/settings" for 2001:1488:ac14:1400:e017:810a:d3a5:63c0 at 2013-03-21 08:11:02 +0100
Processing by SettingsController#index as HTML
Current user: oerdnj (id=3)
Rendered settings/_general.html.erb (5.4ms)
Rendered settings/_display.html.erb (4.3ms)
Rendered common/_tabs.html.erb (12.8ms)
Rendered settings/edit.html.erb within layouts/admin (13.1ms)
Completed 500 Internal Server Error in 18ms
ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8):
11:
12: <p><%= setting_select :time_format, Setting::TIME_FORMATS.collect {|f| [::I18n.l(Time.now, :locale => locale, :format => f), f]}, :blank => :label_language_based %></p>
13:
14: <p><%= setting_select :user_format, @options[:user_format] %></p>
15:
16: <p><%= setting_check_box :gravatar_enabled %></p>
17:
app/views/settings/_display.html.erb:14:in `block in _app_views_settings__display_html_erb__382735947259716240_55203920'
app/views/settings/_display.html.erb:1:in `_app_views_settings__display_html_erb__382735947259716240_55203920'
app/views/common/_tabs.html.erb:24:in `block in _app_views_common__tabs_html_erb__4495962974242832258_54203740'
app/views/common/_tabs.html.erb:23:in `each'
app/views/common/_tabs.html.erb:23:in `_app_views_common__tabs_html_erb__4495962974242832258_54203740'
app/helpers/application_helper.rb:271:in `render_tabs'
app/views/settings/edit.html.erb:3:in `_app_views_settings_edit_html_erb__2259510847400200366_36055040'
app/controllers/settings_controller.rb:28:in `index'
</pre>
<p>Is there any way how to help you with debugging this issue? I could provide you with my configs (I am running redmine under thin), some database tables, etc.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=472202013-03-21T07:45:07ZToshi MARUYAMA
<ul></ul><p>I don't know about ubuntu.<br />Is "Ruby: 1.9.3.0-1ubuntu2.5" recent Ruby?</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=472212013-03-21T08:00:37ZEtienne Massip
<ul></ul><p>Did you run <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/RedmineUpgrade#Step-5-Clean-up">cleanup</a> after upgrade?</p>
<p>Dumb question which I have to ask: did you restart thin after applying patches?</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=472332013-03-21T09:44:05ZOndřej Surý
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul><p>Etienne Massip wrote:</p>
<blockquote>
<p>Did you run <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/RedmineUpgrade#Step-5-Clean-up">cleanup</a> after upgrade?</p>
</blockquote>
<p>Well I did (and the package does that automatically), but it turns out, that tmp:cache:clear command is broken in the pre-packaged version of redmine, and the cache wasn't cleared as it should be.</p>
<p>After I have manually removed contents of /var/cache/redmine/ everything works as it should be.</p>
<p>Sorry for the trouble and I am going to fix the redmine package.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=472362013-03-21T11:16:37ZEtienne Massip
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Invalid</i></li></ul> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=472392013-03-21T12:55:41ZOndřej Surý
<ul></ul><p>Just a quick notice. The real problem isn't in redmine or the packaging, but there's a bug in the rails rake task which ignores settings in the config.paths["tmp"], not to mention session_store, etc. and just mindlessly deletes "tmp/cache" content:</p>
<pre>
namespace :cache do
# desc "Clears all files and directories in tmp/cache"
task :clear do
FileUtils.rm_rf(Dir['tmp/cache/[^.]*'])
end
end
</pre>
<p>and it needs to be something more like</p>
<pre>
namespace :cache do
# desc "Clears all files and directories in tmp/cache"
task :clear do
FileUtils.rm_rf(Dir[File.join(Rails.configuration.path["tmp"],'cache/[^.]*']))
end
end
</pre> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=472482013-03-21T16:09:58ZEtienne Massip
<ul></ul><p><code>Rails.configuration.paths</code> is an undocumented property so I'm not sure you're supposed to manipulate it?</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=472492013-03-21T16:42:19ZOndřej Surý
<ul></ul><p>Etienne Massip wrote:</p>
<blockquote>
<p><code>Rails.configuration.paths</code> is an undocumented property so I'm not sure you're supposed to manipulate it?</p>
</blockquote>
<p>Unfortunatelly that's something we have to live with, since rails apps are not FHS compliant (mixing static data with volatile data – that doesn't go well with traditional distributions, multiple partitions, etc.).</p>
<p>And to tell the truth, it's something I just came to, since those modification were already in the place, when I started helping with redmine packaging for Debian. The good thing is that we can have more instances from same sources, the bad thing is that it breaks sometimes.</p>
<p>I know it's hard to all parties (upstream, distributions and users). And Ruby packaging is especially hard because there's clash in two different approaches (gem and deb).</p>
<p>But all I can do is to cope with that, because our (Debian) users want pre-packaged redmine. And apologize when our changes for packaging break something.</p>
<p>BTW I might be missing something, but <a class="external" href="http://api.rubyonrails.org/classes/Rails/Engine/Configuration.html#method-i-paths">http://api.rubyonrails.org/classes/Rails/Engine/Configuration.html#method-i-paths</a> seems to be documented.</p>
<p>Anyway the good side is that I have modified the redmine package to clear the cache on every upgrade and it finally works. Thanks for your time.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=498252013-06-04T06:20:21ZNedyalko Zhekov
<ul></ul><p>Hi there. I'm new to ruby & rails and just want to contribute my experience to the redmine community.</p>
<p>I had a very similar problem after an upgrade from 1.1.2 to 2.3.1 on Debian Wheezy. I followed the upgrade instructions on the redmine.org page<br /><a class="external" href="http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade">http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade</a>.</p>
<p>The problem was occuring only on pages requiring the same database tables. For example if you go to the settings page there wasn't any problem but if you go to an issue page an error occured.</p>
<p><strong>My environment (./script/about)</strong><br /><em>Environment:<br /> Redmine version 2.3.1.stable<br /> Ruby version 1.9.3 (x86_64-linux)<br /> Rails version 3.2.13<br /> Environment production<br /> Database adapter Mysql2<br />Redmine plugins:<br /> no plugin installed</em></p>
<p><strong>The error message I got in the redmine log (log/production.log)</strong><br />ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):<br /> 30: <% previous_group = group <span>><br /> 31: <</span> end <span>><br /> 32: <tr id="issue-<</span>= issue.id <span>>" class="hascontextmenu <</span>= cycle('odd', 'even') <span>> <</span>= issue.css_classes <span>> <</span>= level > 0 ? "idnt idnt-#{level}" : nil <span>>"><br /> 33: <td class="checkbox hide-when-print"><</span>= check_box_tag("ids[]", issue.id, false, :id => nil) <span>></td><br /> 34: <</span>= raw query.inline_columns.map {|column| "<td class=\"#{column.css_classes}\">#{column_content(column, issue)}</td>"}.join <span>><br /> 35: </tr><br /> 36: <</span> @query.block_columns.each do |column|<br /> app/views/issues/_list.html.erb:33:in `block (2 levels) in <em>app_views_issues</em>_list_html_erb__796519447520383731_58016060'<br /> app/helpers/issues_helper.rb:29:in `block in issue_list'<br /> app/helpers/issues_helper.rb:25:in `each'<br /> app/helpers/issues_helper.rb:25:in `issue_list'<br /> app/views/issues/_list.html.erb:18:in `block in <em>app_views_issues</em>_list_html_erb__796519447520383731_58016060'<br /> app/views/issues/_list.html.erb:1:in `_app_views_issues__list_html_erb__796519447520383731_58016060'<br /> app/views/issues/index.html.erb:62:in `_app_views_issues_index_html_erb___1459416343466838695_57006680'<br /> app/controllers/issues_controller.rb:83:in `block (2 levels) in index'<br /> app/controllers/issues_controller.rb:82:in `index'</p>
<p><strong>My solution</strong><br />After looking for about 12 hours in the logs I fixed my problem. I've installed the gem package mysql2 and then changed the adapter in config/database.yml to mysql2. That solved the problem. I hope this can save you some hours in looking for a solution.</p>
<p><em>config/database.yml<br />production:<br /> adapter: mysql2<br /> database: redmine<br /> host: localhost<br /> username: xxxxxxxx<br /> password: xxxxxxxx<br /> encoding: utf8</em></p>
<p><em>$ gem list | grep mysql<br />mysql (2.8.1)<br />mysql2 (0.3.11)</em></p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=503822013-07-06T19:33:00ZLadislav Nesnera
<ul></ul><p>Big thanks Nedyalko - your advice (change adapter: mysql to mysql2) solved also my problem (upgrade from 1.4.4 to 2.3.1).</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=505232013-07-13T01:32:27ZCuong Nguyen
<ul></ul><p>Thanks, Nedyalko! I works in my case (2.3.1).</p>
<p>I met the same problem after upgrading from Debian 6 to 7 (Wheezy).</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=513112013-08-20T02:26:00ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/14710">Defect #14710</a>: Settings the left 500 error in ruby1.9.2</i> added</li></ul> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=513232013-08-20T19:58:16ZScott Van Wart
<ul></ul><p>I was getting a segfault with Redmine 2.0.3 and Ruby 1.8.7, so I updated to Redmine 2.3.2 and Ruby 1.9.3. Then I got this:</p>
<pre>Started GET "/issues/437" for 127.0.0.1 at 2013-08-20 16:47:45 -0300
Processing by IssuesController#show as HTML
Parameters: {"id"=>"437"}
Current user: scott (id=1)
Rendered issues/_action_menu.html.erb (6.2ms)
Rendered issues/show.html.erb within layouts/base (37.4ms)
Completed 500 Internal Server Error in 119ms
ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):
78:
79: <p><strong><%=l(:field_description)%></strong></p>
80: <div class="wiki">
81: <%= textilizable @issue, :description, :attachments => @issue.attachments %>
82: </div>
83: </div>
84: <% end %>
app/views/issues/show.html.erb:81:in `_app_views_issues_show_html_erb___3362741532134977815_56752880'
app/controllers/issues_controller.rb:119:in `block (2 levels) in show'
app/controllers/issues_controller.rb:116:in `show'</pre>
<p>I did as suggested in update <a class="issue tracker-1 status-5 priority-5 priority-high2 closed" title="Defect: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Sett... (Closed)" href="https://www.redmine.org/issues/13520#note-16">#13520-16</a> and it solved my problem.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=515632013-09-03T22:30:49ZMichael C
<ul></ul><p>Hello!</p>
<p>I've got this error for new Redmine 2.3.2 installation. I've tried all the patched and methods which has been described above, but nothing helped. I can not solve it for a whole day so I'm writing here.</p>
<p>Here is my Ruby: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]<br />Mysql 5.0.95 for redhat-linux-gnu (x86_64) (driver "mysql2" in redmine)<br />Database with utf8 uncoding<br />Redmine 2.3.2</p>
<p>I created new issue in Russian language and get 500 error when try to view it:<br /><pre>
Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.
If you are the Redmine administrator, check your log files for details about the error.
</pre></p>
<p>Here is the data from Log:<br /><pre>
Connecting to database specified by database.yml
OpenIdAuthentication.store is nil. Using in-memory store.
Creating scope :system. Overwriting existing method Enumeration.system.
Creating scope :sorted. Overwriting existing method Group.sorted.
Creating scope :sorted. Overwriting existing method User.sorted.
Started GET "/issues/2" for 1.2.3.4 at 2013-09-03 22:15:30 +0000
Processing by IssuesController#show as HTML
Parameters: {"id"=>"2"}
Current user: Michael (id=5)
Rendered issues/_action_menu.html.erb (14.6ms)
Rendered issues/show.html.erb within layouts/base (29.4ms)
Completed 500 Internal Server Error in 814ms
ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):
22: <%= avatar(@issue.author, :size => "50") %>
23:
24: <div class="subject">
25: <%= render_issue_subject_with_tree(@issue) %>
26: </div>
27: <p class="author">
28: <%= authoring @issue.created_on, @issue.author %>.
app/views/issues/show.html.erb:25:in `_app_views_issues_show_html_erb__4258364884133161359_23990214715200'
app/controllers/issues_controller.rb:119:in `block (2 levels) in show'
app/controllers/issues_controller.rb:116:in `show'
</pre></p>
<p>I'ready to help with any experiments or testing, if you need, I can get you an access to the stand.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=602742014-12-05T15:51:08Zmeta tech
<ul></ul><p>I tried all suggestions in this post.<br />The only fix that works is here below.<br />I am surprised that it is not included in the latest version (2.6.0)</p>
<p>--- redmine/app/helpers/application_helper.rb<br />+++ redmine/app/helpers/application_helper.rb<br /><code>@ -925,7 +925,8 </code>@ module ApplicationHelper<br /> end</p>
<pre><code>def lang_options_for_select(blank=true)<br />- (blank ? [["(auto)", ""]] : []) + languages_options<br />+ (blank ? [["(auto)", ""]] : []) <ins><br /></ins> valid_languages.collect{|lang| [ ll(lang.to_s, :general_lang_name), lang.to_s]}.sort{|x,y| x.last <=> y.last }<br /> end</code></pre>
<p>P.S. : I am using Redmine 2.5.0, and the error appeared after a migration from Ruby 1.8 to 1.9.3.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=605852014-12-26T05:45:45ZAnonymous
<ul></ul><p>Have the same issue. Applied patch of "meta tech" and it helped. The problem appeared on ruby of version 2.1.0 and redmine version 2.6.0.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=605972014-12-26T11:53:43ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Dastan Kozhomuratov wrote:</p>
<blockquote>
<p>Have the same issue. Applied patch of "meta tech" and it helped. The problem appeared on ruby of version 2.1.0 and redmine version 2.6.0.</p>
</blockquote>
<p><a class="changeset" title="Force UTF-8 encoding of language names." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/13807">r13807</a> should fix this error.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=607282015-01-08T09:10:34ZSergey T
<ul></ul><p>Ruby 2.1.5 and Redmine v 2.6.0 (<a class="changeset" title="Force UTF-8 encoding of language names." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/13807">r13807</a>)</p>
<p>Here is the data from Log:</p>
<pre>
ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):
27: <tbody>
28: <% project_tree(@projects) do |project, level| %>
29: <tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
30: <td class="name"><span><%= link_to_project_settings(project, {}, :title => project.short_description) %></span></td>
31: <td><%= checked_image project.is_public? %></td>
32: <td><%= format_date(project.created_on) %></td>
33: <td class="buttons">
app/views/admin/projects.html.erb:30:in `block in _app_views_admin_projects_html_erb___1335584868889568955_70054962614940'
app/models/project.rb:765:in `block in project_tree'
app/models/project.rb:761:in `each'
app/models/project.rb:761:in `project_tree'
app/helpers/application_helper.rb:374:in `project_tree'
app/views/admin/projects.html.erb:28:in `_app_views_admin_projects_html_erb___1335584868889568955_70054962614940'
</pre> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=608032015-01-12T11:43:40ZTobias Fischer
<ul></ul><p>Hi Jean-Philippe,</p>
<p>unfortunately your patch from <a class="changeset" title="Force UTF-8 encoding of language names." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/13807">r13807</a> doesn't fix the issue for repositories in v2.6.1 (see <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Git: repository page crashes when non-ascii character in tag or branch name (Closed)" href="https://www.redmine.org/issues/16881">#16881</a>).<br />Any chance to include the patch from <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Git: repository page crashes when non-ascii character in tag or branch name (Closed)" href="https://www.redmine.org/issues/16881">#16881</a> in one of the next versions?</p>
<p>Thanks!</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=608112015-01-12T23:09:00ZToshi MARUYAMA
<ul></ul><p>Tobias Fischer wrote:</p>
<blockquote>
<p>Hi Jean-Philippe,</p>
<p>unfortunately your patch from <a class="changeset" title="Force UTF-8 encoding of language names." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/13807">r13807</a> doesn't fix the issue for repositories in v2.6.1 (see <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Git: repository page crashes when non-ascii character in tag or branch name (Closed)" href="https://www.redmine.org/issues/16881">#16881</a>).<br />Any chance to include the patch from <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Git: repository page crashes when non-ascii character in tag or branch name (Closed)" href="https://www.redmine.org/issues/16881">#16881</a> in one of the next versions?</p>
</blockquote>
<p><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Git: repository page crashes when non-ascii character in tag or branch name (Closed)" href="https://www.redmine.org/issues/16881">#16881</a> is not related with this issue.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=608122015-01-12T23:13:20ZToshi MARUYAMA
<ul></ul><p>Sergey T wrote:</p>
<blockquote>
<p>Ruby 2.1.5 and Redmine v 2.6.0 (<a class="changeset" title="Force UTF-8 encoding of language names." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/13807">r13807</a>)</p>
<p>Here is the data from Log:</p>
<p>[...]</p>
</blockquote>
<p>This is not related with this issue.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=617362015-02-26T15:03:57Zanton profit
<ul><li><strong>File</strong> <a href="/attachments/13191">123.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/13191/123.jpg">123.jpg</a> added</li></ul><p>The same problem.</p>
<p>Environment:<br /> Redmine version 3.0.0.stable.14044<br /> Ruby version 2.1.5-p273 (2014-11-13) [x86_64-linux-gnu]<br /> Rails version 4.2.0<br /> Environment development<br /> Database adapter Mysql2<br />SCM:<br /> Subversion 1.6.17<br /> Git 1.7.9.5<br /> Filesystem <br />Redmine plugins:<br /> no plugin installed</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=622162015-03-13T08:46:28ZLya D
<ul></ul><p>I had the same problem and this solution is working for me :</p>
<p>Check your linux locales :</p>
<blockquote>
<p>dpkg-reconfigure locales</p>
</blockquote>
<p>Check your locale</p>
<p>Generating locales (this might take a while)...<br />fr_FR.UTF-8... done</p>
<p>Delete your redmine cache</p>
<blockquote>
<p>mv /path/to/redmine/tmp/cache /path/to/redmine/tmp/cache.old<br />mkdir /path/to/redmine/tmp/cache<br />chown youruser /path/to/redmine/tmp/cache</p>
</blockquote>
<p>Restart apache (restart redmine)</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=625982015-03-27T17:43:38ZJosé Nunes de Oliveira Neto
<ul></ul><p>I'm on Ubuntu 14.04.</p>
<p>I updated my redmine 2.4 to last stable 2.5.1 with Ondrej PPA and after, i got the same error.</p>
<p>So, i did the following commands:</p>
<pre>
$ apt-get install ruby-mysql2
$ gem install mysql2
</pre>
<p>And i change my database.yml to</p>
<pre>
adapter: mysql2
</pre>
<p>After Apache restarts, i did my redmine instance work.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=630052015-04-11T14:28:02ZToshi MARUYAMA
<ul></ul><p>anton profit wrote:</p>
<blockquote>
<p>The same problem.<br /><a class="attachment" href="https://www.redmine.org/attachments/13191">123.jpg</a></p>
</blockquote>
<p>Your problem is fixed by <a class="issue tracker-1 status-5 priority-5 priority-high2 closed" title="Defect: settings: incompatible character encodings: UTF-8 and ASCII-8BIT: yaml generated on ruby 1.8 (Closed)" href="https://www.redmine.org/issues/19305">#19305</a>.</p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=652852015-08-05T14:37:05ZAlexandre Rock Ancelet
<ul></ul><p>Actually, I've just migrated from Redmine 2.6 to 3.1 and I ran into this problem on <code>messages#show</code> and <code>wiki#show</code>.</p>
<p>Using <strong><code>dpkg-reconfigure locales</code></strong> solution proposed by <strong>@Lya D</strong> worked for me !</p>
<p>Any other solution did not work.</p>
<p>If it can help anyone coming back into this issue.</p>
<pre>Environment:
Redmine version 3.1.0.stable.14479
Ruby version 1.9.3-p194 (2012-04-20) [x86_64-linux]
Rails version 4.2.3
Environment production
Database adapter Mysql2
SCM:
Subversion 1.6.17
Git 1.9.1
Filesystem
Redmine plugins:
redmine_checklists 3.1.0
redmine_custom_css 0.1.6
redmine_dmsf 1.5.2
redmine_exception_handler 2.0.0.devel.eb74a043bd
redmine_spent_time_in_issue_description 2.6
redmine_zenedit 0.0.2
</pre>
<p>Errors I had before solving the bug:<br /><pre>An ActionView::Template::Error occurred in wiki#show:
incompatible character encodings: UTF-8 and ASCII-8BIT
app/helpers/application_helper.rb:914:in `block in parse_headings'
---
An ActionView::Template::Error occurred in messages#show:
incompatible character encodings: UTF-8 and ASCII-8BIT
app/views/messages/show.html.erb:66:in `block in _app_views_messages_show_html_erb__1670534409470203738_62374345629360'</pre></p> Redmine - Defect #13520: Internal Error (incompatible character encodings: ASCII-8BIT and UTF-8) when accessing Admin/Settings, Account, etc.https://www.redmine.org/issues/13520?journal_id=659872015-09-13T00:04:11ZEugen Funk
<ul></ul><p>same here:<br /><pre>
Rendered projects/show.html.erb within layouts/base (403.2ms)
Completed 500 Internal Server Error in 2871ms (ActiveRecord: 65.7ms)
ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):
62: </div>
63:
64: <div class="splitcontentright">
65: <%= render :partial => 'members_box' %>
66:
67: <% if @news.any? && authorize_for('news', 'index') %>
68: <div class="news box">
app/views/projects/show.html.erb:65:in `_app_views_projects_show_html_erb__2186080689967109683_38420520'
app/controllers/projects_controller.rb:153:in `show'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
</pre><br />after calling<br /><pre>
sudo dpkg-reconfigure locales
</pre><br />I receive <br /><pre>
Generating locales...
de_DE.UTF-8... up-to-date
en_US.ISO-8859-1... up-to-date
en_US.ISO-8859-15... up-to-date
en_US.UTF-8... up-to-date
hu_HU.ISO-8859-2... up-to-date
hu_HU.UTF-8... up-to-date
Generation complete.
</pre><br />but the error is still there.<br />However, when I installed redmine, sudo dpkg-reconfigure locales returned errors about not selected language.<br />Maybe I miss how to reset the cache? The commands provided by @Lya-D didnt work.</p>