Good night. I'm doing the getting started guide of RoR, but I have a trouble: When I click the New Article button that redirects to the form, Rails throw an 'Encountered a syntax error while rendering template.' The new.html.erb code is
<h1>New Article</h1>
<%= form_with scope: :article, url: articles_path, local: true do |form| %>
<%= if @article.errors.any? %>
<div id="error_explanation">
<h2>
<%= pluralize(@article.errors.count, "error") %>
prohibited this article from being saved:
</h2>
<ul>
<% @article.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<P>
<%= form.label :title %><br>
<%= form.text_field :title %>
</p>
<p>
<%= form.label :text %><br>
<%= form.text_area :text %>
</p>
<p>
<%= form.submit %>
</p>
<% end %>
<%= link_to 'Back', articles_path %>
The code is the same as the guide's code, so i don't know where the error or errors can be. I also attach the error screenshot if it's any help. Rails error message when I want tho create a new Article