私はRailsを学ぶために取り組んでいる単純なテストアプリケーションで次のエラーが発生しています。構文エラー、予期しない ' 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>
私ができる広範囲にこれをGoogleで検索してきました私のコードで何が間違っているのか理解していない。ありがとう!
Rubyを初めて使う人はよくある間違いです。私も問題があった。 –