Ruby on Rails blog demo for Windows

If you ever tried following the screencast tutorial over 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

Unless there's some ruby cleverness I've missed. 



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


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s