[Ironruby-core] IronRuby 0.6 and Rails

Jimmy Schementi Jimmy.Schementi at microsoft.com
Tue Jul 14 15:12:34 EDT 2009

Have you read the documentation on how to get IronRuby running Rails?

Here's the relevant info:
8. Rails by default uses UTF-8 encoding, but IronRuby has issues when mixing this encoding with UTF-8 strings from .NET. For now, you can disable encoding by removing the method body of Rails::Initializer#initialize_encoding in rails-2.3.2\lib\initializer.rb.
From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Ben Hall [ben2004uk at googlemail.com]
Sent: Tuesday, July 14, 2009 10:56 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] IronRuby 0.6 and Rails


I'm trying to re-use the same demo I used on IronRuby 0.3 however on
0.6 I'm getting the following error:

IronRuby::Builtins::EncodingCompatibilityError in Posts#index

Showing app/views/posts/index.html.erb where line #12 raised:

incompatible character encodings: utf-8 (KCODE) and utf-8

The code does this:
<% @posts.each do |p| %>
    <td><%= p.Title %></td>
<% end %>

p is a Post C# object, Title is a string populated by a C# framework.

Please help!


Ironruby-core mailing list
Ironruby-core at rubyforge.org

More information about the Ironruby-core mailing list