Ruby on Rails上的无效字节序列错误loadin页面

时间:2018-12-03 18:45:27

标签: ruby-on-rails ruby

我尝试在Rails上运行项目,但出现此错误:

Encoding::InvalidByteSequenceError in Sessiones#iniciar_session

ActionView::Template::Error ("\xC2" followed by "\\" on UTF-8):
    1: <meta name="viewport" content="width=device-width, initial-scale=1">
    2:
    3: <div class="login-header text-center">
    4:   <!-- <% image_tag "logo/logo-white.png", :class => "logo" %> -->
    5:   <% image_tag "logo/logos-bat/texto-blanco/logo.svg", :class => "logo" %>
    6:   <!-- <% image_tag "logo/logos-/texto-blanco/logo.svg", :class => "logo" %> -->
    7: </div>
  app/views/sessiones/iniciar_session.html.erb:4:in `app_views_sessiones_iniciar_session_html_erb__3221493018978497249_47443666135760'

我与

  • Ruby 2.3.1
  • Rails 4.2.0

1 个答案:

答案 0 :(得分:1)

添加

# encoding: utf-8

在引发错误的文件的顶部