私は手動レールhttp://guides.rubyonrails.org/getting_started.html に従っています 5.12 ポイントの更新投稿を取得します。しかし、投稿を編集すると、次のエラーが返されます。
Blog / app / views / posts / edit.html.erb: 7: syntax error, unexpected tSTRING_DEND, expecting keyword_end
'; @ output_buffer.append = form_for: post, url: post_path (@ post.id)},
blog / app / views / posts / edit.html.erb: 38: syntax error, unexpected keyword_ensure, expecting end-of-input
これはコードです:
<%= link_to 'Back', posts_path %>
<%= form_for :post, url: post_path(@post.id) },
method: :patch do |f| %>
<% if @post.errors.any? %>
<div id="errorExplanation">
間違いは「編集」ページにアクセスすることです。7 行目の a を期待するメッセージを返しますが、その行は正確にコピーされます。行末に が表示され、カンマが終わっていないことが示されます。
何か案が?