[Ironruby-core] IronRuby 0.6 and Rails

Ben Hall ben2004uk at googlemail.com
Tue Jul 14 16:22:40 EDT 2009


hmmm, I made the change but now it is erroring around <%= yield %>

 IronRuby::Builtins::EncodingCompatibilityError in Posts#index

Showing app/views/layouts/posts.html.erb where line #15 raised:

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



On Tue, Jul 14, 2009 at 8:12 PM, Jimmy
Schementi<Jimmy.Schementi at microsoft.com> wrote:
> Have you read the documentation on how to get IronRuby running Rails?
> http://ironruby.net/Documentation/Real_Ruby_Applications/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
>
> Hello,
>
> 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| %>
>  <tr>
>    <td><%= p.Title %></td>
>  </tr>
> <% end %>
>
> p is a Post C# object, Title is a string populated by a C# framework.
>
> Please help!
>
> Thanks
>
> Ben
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>


More information about the Ironruby-core mailing list