If you ever tried following the screencast tutorial over rubyonrails.org and FOLLOW EXACTLY the code that was being pasted, you’ll eventually run into this error:
compile error C:/Documents and Settings/User/testtesttest/app/views/posts/_post.html.erb:1: syntax error, unexpected kDO_BLOCK, expecting tCOLON2 or '[' or '.' ...mplate=true ; div for post do ; @output_buffer.concat "\n" ^ C:/Documents and Settings/User/testtesttest/app/views/posts/_post.html.erb:5: syntax error, unexpected kENSURE, expecting $end
Remember, Google is your friend! I found this post very helpful:
"Also shouldn't it be for post in @posts do ... end Unless there's some ruby cleverness I've missed. HTH Matt"
so the correct code for that particular snippet should be to replace the
div for post do
part in the _partial.html.erb with
for post in @posts do