레일즈를 배우기 위해 간단한 테스트 앱에서 다음과 같은 오류가 나타납니다.구문 오류, 예상치 못한 ' n', 예상 tCOLON2 또는 '['또는 '.'
syntax error, unexpected '\n', expecting tCOLON2 or '[' or '.'
그것은 undexpected 휴식이 있다는 것을있을 말하고,하지만 아래에있는 내 코드에 어떤 문제가 있는지 알아낼 수 없습니다 나타납니다 :
#app/views/quotations/index.html.erb
<% title "Quotations" %>
<table>
<tr>
<th>Quote Text</th>
<th>Author</th>
<th>Quote type</th>
<th>Category</th>
<th>Tags</th>
</tr>
<% for @quotations.each do |quotation| %>
<tr>
<td><%= quotation.quote_text %></td>
<td><%= quotation.author %></td>
<td><%= quotation.quote_type %></td>
<td><%= quotation.category %></td>
<td><%= quotation.tags %></td>
<td><%= link_to "Show", [@user, quotation] %></td>
<td><%= link_to "Edit", edit_user_quotation_path(@user, quotation) %></td>
<td><%= link_to "Destroy", [@user, quotation], :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<p><%= link_to "New Quotation", new_user_quotation_path(@user) %></p>
내가 할 수 광범위하게이 인터넷 검색 및했습니다 내 코드가 무엇이 잘못되었는지 파악하지 마라. 감사!
Ruby를 처음 사용하는 경우 일반적인 실수입니다. 나도 문제가 있었어. –