Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5939143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:47:05+00:00 2026-05-22T15:47:05+00:00

I’m following the tutorial here: http://guides.rubyonrails.org/getting_started.html Everything was working fine until I tried 8.1

  • 0

I’m following the tutorial here: http://guides.rubyonrails.org/getting_started.html

Everything was working fine until I tried “8.1 Rendering Partial Collections” I started getting this error message:

500 Internal Server Error

If you are the administrator of this
website, then please read this web
application’s log file and/or the web
server’s log file to find out what
went wrong.

In the development log file I have:

Started GET "/posts/3" for 127.0.0.1 at 2011-05-24 16:53:35 +0300
  Processing by PostsController#show as HTML
  Parameters: {"id"=>"3"}
  [1m[36mPost Load (0.2ms)[0m  [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 3 LIMIT 1[0m
ERROR: compiling _app_views_posts_show_html_erb___599541849308356030_2168837280__3307996878912411319 RAISED /Users/username/Projects/blog/app/views/posts/show.html.erb:20: syntax error, unexpected tASSOC, expecting ')'
...         :collection => @post.comments );@output_buf...
...                                ^
Function body:           def _app_views_posts_show_html_erb___599541849308356030_2168837280__3307996878912411319(local_assigns)
            _old_virtual_path, @_virtual_path = @_virtual_path, "posts/show";_old_output_buffer = @output_buffer;;@output_buffer = ActionView::OutputBuffer.new;@output_buffer.safe_concat('<p class="notice">');@output_buffer.append= ( notice );@output_buffer.safe_concat('</p>
 
<p>
  <b>Name:</b>
  ');@output_buffer.append= ( @post.name );@output_buffer.safe_concat('
');@output_buffer.safe_concat('</p>

What’s wrong?

Please help.

EDIT: views/posts/show.html.erb:

<p class="notice"><%= notice %></p>
 
<p>
  <b>Name:</b>
  <%= @post.name %>
</p>
 
<p>
  <b>Title:</b>
  <%= @post.title %>
</p>
 
<p>
  <b>Content:</b>
  <%= @post.content %>
</p>
 
<h2>Comments</h2>
<%= render :partial => "comments/comment",
           :collection => @post.comments %>
 
<h2>Add a comment:</h2>
<%= render "comments/form" %>
 
<br />
 
<%= link_to 'Edit Post', edit_post_path(@post) %> |
<%= link_to 'Back to Posts', posts_path %> |

EDIT 2:

Here’s views/comments/_comment.html.erb

<p>
  <b>Commenter:</b>
  <%= comment.commenter %>
</p>
 
<p>
  <b>Comment:</b>
  <%= comment.body %>
</p>

If I remove the following the app runs:

<%= render :partial => "comments/comment",
           :collection => @post.comments %>

However, if I change the content of _comment.html.erb to blablabla it still show the same error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:47:05+00:00Added an answer on May 22, 2026 at 3:47 pm

    “syntax error, unexpected tASSOC, expecting ‘)'”

    You appear to be missing a closing parenthesis somewhere. Without seeing the surrounding code that’s the best we can do.

    Edit: by “surrounding code” I mean surrounding views/posts/show.html.erb:20.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have just tried to save a simple *.rtf file with some websites and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a French site that I want to parse, but am running into
In order to apply a triggered animation to all ToolTip s in my app,
I am currently running into a problem where an element is coming back from
Basically, what I'm trying to create is a page of div tags, each has
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.