Ho riscontrato il seguente errore in una semplice app di prova su cui sto lavorando per imparare Rails.Errore di sintassi, imprevisto ' n', in attesa di tCOLON2 o '[' o '.'
syntax error, unexpected '\n', expecting tCOLON2 or '[' or '.'
Sembra che sta dicendo essere che ci sia una pausa di undexpected, ma non riesco a capire che cosa è sbagliato con il mio codice qui sotto:
#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>
Googled questo ampiamente e posso capisco cosa c'è che non va nel mio codice Grazie!
E 'un errore comune, se siete nuovi a Ruby. Anch'io ho avuto il problema .. –