在UTF-8上的Home #index“\ xA9”中编码:: InvalidByteSequenceError
我是Ruby on Rails的新手,现在已经和这个问题争论了一段时间。
我从git中删除了一个网站,并确保安装了所有依赖项,但是,当我运行该站点时,我收到错误:
ActionView :: Template :: Error(UTF-8上的“\ xA9”)
因为使用代码image_path("bground2.jpg")
链接图像的行。
当我删除image_path("bground2.jpg")
,错误得到解决。
然而,我需要image_path("bground2.jpg")
并且离不开它。
我在这里尝试了解决方案,但似乎没有用
这是index.html.erb
文件的一部分,但错误在包含image_path
和image_url
所有位置重复出现:
<div class="img-responsive" style="background-image: url(); background-position: 50% 0;height: 500px;">