我用的是“苗条”,我不知道如何解决这个问题。我看到这个错误:
SyntaxError at /user/user语法错误,意外keyword_else,期待keyword_end;否则;^/视图/用户/共享/_user_item.html.slm:18:语法错误,意外keyword_ensure,期望输入结束
这是从这个文件:
li
.common_box.box3
.img_box
= link_to user do
- if user.avatar.present?
img alt="" src="#{user.avatar.try(:image_url, :similar)}" style=("width: 194px;height: 139px;") /
- else
img alt="no image" src="" style=("width: 194px;height: 139px;") /
.img_detail
small years
.circle
span.age_box = user.age
h3 #{user.username} #{current_user.location.state}
h4 #{user.location.city}, #{user.location.state}
.green_corner
img alt="" src="/assets/side_curv.png" /发布于 2015-03-06 03:06:11
在line 6上试试这个(您的图像标记没有缩进)。
li
.common_box.box3
.img_box
= link_to user do
- if user.avatar.present?
img alt="" src="#{user.avatar.try(:image_url, :similar)}" style=("width: 194px;height: 139px;") /
- else
img alt="no image" src="" style=("width: 194px;height: 139px;") /
.img_detail
small years
.circle
span.age_box = user.age
h3 #{user.username} #{current_user.location.state}
h4 #{user.location.city}, #{user.location.state}
.green_corner
img alt="" src="/assets/side_curv.png" /https://stackoverflow.com/questions/28891685
复制相似问题