Project

General

Profile

error 500 when using not-ascii characters.. :(

Added by Marco MEYER over 10 years ago

Hello,

I'm using redmine on a NAS Synology. Some packages are old or special.. For example i can only use mysql and not mysql2. Actual ruby version is ruby 1.9.1p243 (2009-07-16 revision 24175) [powerpc-linux-spe]

Anyway,.. I success to install redmine 1.2.3 and lower : [[http://redmine.gauss-it.net]]
It work fine, but I can't fix a big problem. :-'(
When i use not-ascii characters (expl : éçàè), i have an internal error (error 500)
Someone known how to fix that ? I need redmine quickly, if someone can answers quickly.. :-)

Thank's a lot !

PS :I'm french, sorry for my english !!


Replies (2)

RE: error 500 when using not-ascii characters.. :( - Added by Marco MEYER over 10 years ago

I send informations about my configuration, i haven't my laptop before.

Gauss-IT> RAILS_ENV=production script/about  
About your application's environment
Ruby version              1.9.1 (powerpc-linux-spe)
RubyGems version          1.3.7
Rack version              1.1
Rails version             2.3.11
Active Record version     2.3.11
Active Resource version   2.3.11
Action Mailer version     2.3.11
Active Support version    2.3.11
Edge Rails revision       unknown
Application root          /volume1/homes/redmine/1.2.3
Environment               production
Database adapter          mysql
Database schema version   20110511000000
Gauss-IT> gem env     
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.9.1 (2009-07-16 patchlevel 243) [powerpc-linux-spe]
  - INSTALLATION DIRECTORY: /opt/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: /opt/bin/ruby
  - EXECUTABLE DIRECTORY: /opt/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - powerpc-linux
  - GEM PATHS:
     - /opt/lib/ruby/gems/1.9.1
     - /root/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

Example of error :

ActionView::TemplateError (incompatible character encodings: US-ASCII and UTF-8) on line #20 of app/views/account/register.rhtml:
17: <%= password_field_tag 'password_confirmation', nil, :size => 25  %></p>
18: <% end %>
19:
20: <p><label for="user_firstname"><%=l(:field_firstname)%> <span class="required">*</span></label>
21: <%= text_field 'user', 'firstname'  %></p>
22:
23: <p><label for="user_lastname"><%=l(:field_lastname)%> <span class="required">*</span></label>

    app/views/account/register.rhtml:20:in `concat'
    app/views/account/register.rhtml:20:in `block in _run_rhtml_app47views47account47register46rhtml'
    app/views/account/register.rhtml:3:in `_run_rhtml_app47views47account47register46rhtml'

or

ActionView::TemplateError (incompatible character encodings: UTF-8 and ASCII-8BIT) on line #10 of app/views/account/register.rhtml:
7: <!--[form:user]-->
8: <% if @user.auth_source_id.nil? %>
9: <p><label for="user_login"><%=l(:field_login)%> <span class="required">*</span></label>
10: <%= text_field 'user', 'login', :size => 25 %></p>
11:
12: <p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
13: <%= password_field_tag 'password', nil, :size => 25  %><br />

    app/views/account/register.rhtml:10:in `concat'
    app/views/account/register.rhtml:10:in `block in _run_rhtml_app47views47account47register46rhtml'
    app/views/account/register.rhtml:3:in `_run_rhtml_app47views47account47register46rhtml'
    <internal:prelude>:8:in `synchronize'
    /opt/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
    /opt/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
    /opt/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

Rendering /volume1/homes/redmine/1.2.3/public/500.html (500 Internal Server Error)

RE: error 500 when using not-ascii characters.. :( - Added by Pablo Estiga over 8 years ago

I have found it very similar to:
http://www.redmine.org/boards/2/topics/30142?r=31352

and resolved it installing mysql2 engine (apt-get install ruby-mysql2)

And changing database.yml:

adapter: mysql2

    (1-2/2)