开发者

RoR 3.0.7 UTF-8 error

开发者 https://www.devze.com 2023-03-10 16:09 出处:网络
RoR keeps trowing this error: incompatible character 开发者_JAVA技巧encodings: UTF-8 and ASCII-8BIT

RoR keeps trowing this error:

incompatible character 开发者_JAVA技巧encodings: UTF-8 and ASCII-8BIT Extracted source (around line #631):

628:     </table>
629:     </td>
630:     <td width="828" valign="top">
631:       <%=  yield %>
632:       <br />
633:     </td>
634:   </tr>

How can <%= yield %> be causing this?

Thank you.


Try adding this to the top of your file:

# encoding: utf-8

and probably make sure that this is in your config/application.rb:

module Foo
  class Application < Rails::Application
    # Configure the default encoding used in templates for Ruby 1.9.
    config.encoding = "utf-8"
  end
end
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号