开发者

RoR 3.0.7 UTF-8 error

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜