# Error following the 15 minute blog with ROR Screen cast

**URL:** <https://www.ruby-forum.com/t/error-following-the-15-minute-blog-with-ror-screen-cast/166621>\
**Category:** Rails\
**Created:** [April 27, 2009, 11:53pm UTC](https://www.ruby-forum.com/t/error-following-the-15-minute-blog-with-ror-screen-cast/166621 "2009-04-27T23:53:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tommo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ebca7d/32.png) [@Tommo](https://www.ruby-forum.com/u/Tommo)\
**Post date:** [April 27, 2009, 11:53pm UTC](https://www.ruby-forum.com/t/error-following-the-15-minute-blog-with-ror-screen-cast/166621/1 "2009-04-27T23:53:39Z")

</div>

Hello Everyone,

I was following this screen cast:  
[http://media.rubyonrails.org/video/rails\_blog\_2.mov](http://media.rubyonrails.org/video/rails_blog_2.mov)

and when I got to the part about making a new file, creating a  
template, and then rendering the partial, I received the following  
error page:

SyntaxError in Posts#show

Showing app/views/posts/\_post.html.erb where line #1 raised:

compile error  
C:/Documents and Settings/Tomo/ror/blog/app/views/posts/\_post.html.erb:  
1: syntax error, unexpected kDO\_BLOCK, expecting tCOLON2 or ‘[’ or ‘.’  
old\_output\_buffer = output\_buffer;post = local\_assigns  
[:post];object = local\_assigns[:object];;@output\_buffer = ‘’;  
\_\_in\_erb\_template=true ; div for @post do ; @output\_buffer.concat  
“\n”

^  
C:/Documents and Settings/Tomo/ror/blog/app/views/posts/\_post.html.erb:  
6: syntax error, unexpected kENSURE, expecting $end  
Extracted source (around line #1):

1: \<% div for @post do %\>  
2:

## \<%= link\_to\_unless\_current h(post.title), post %\>
  
3: \<%= simple\_format h(post.body) %\>  
4: \<% end %\>  
Trace of template inclusion: app/views/posts/\_post.html.erb, app/views/  
posts/show.html.erb

RAILS\_ROOT: C:/Documents and Settings/Tomo/ror/blog

Application Trace | Framework Trace | Full Trace  
app/views/posts/\_post.html.erb:6:in `compile!' app/views/posts/show.html.erb:1 app/controllers/posts_controller.rb:18:in `show’  
Request

Parameters:

{“id”=\>“2”}  
Show session dump

Response

Headers:

{“cookie”=\>[],  
“Content-Type”=\>“text/html”,  
“Cache-Control”=\>“no-cache”}

This question has been asked before but it does not seem like there  
was an answer given. Hopefully somebody will be able to help me out.  
Thanks!

Tom

---

<div class="post-metadata">

**Author:** ![Tommo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ebca7d/32.png) [@Tommo](https://www.ruby-forum.com/u/Tommo)\
**Post date:** [April 27, 2009, 11:55pm UTC](https://www.ruby-forum.com/t/error-following-the-15-minute-blog-with-ror-screen-cast/166621/2 "2009-04-27T23:55:25Z")

</div>

On Apr 27, 9:33 pm, Tommo [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 1: \<% div for @post do %\>

You’ve got a typo here - it should be div\_for

Fred
