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 6347923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:19:11+00:00 2026-05-24T21:19:11+00:00

I’m running into two errors here that I am not sure how to deal

  • 0

I’m running into two errors here that I am not sure how to deal with. I get 2 errors when the following page is to load (it doesn’t load at all, just shows me the 2 errors when I try to access it).

Error 1: /home/<…>/profile_pic.html.erb:7: syntax error, unexpected kDO_BLOCK
…ofile_pics, ProfilePic.new, do |builder| @output_buffer.safe…

Error 2: /home/<…>/profile_pic.html.erb:16: syntax error, unexpected kENSURE, expecting $end

Here is the code that is causing us problems:
<%= render :partial => ‘layouts/head_loggedin’ %>

<div id="main" style="float: left;">
  <% render :partial => 'layouts/head_settings' %>
  <h1>Change your profile picture</h1>
  <%= form_for(:update_profile_pic, :url => {:controller => 'setting', :action => 'update_profile_pic'}, :html => {:multipart => true}) do |f|%>
  <%= f.fields_for :profile_pics, ProfilePic.new, do |builder| %>
  <%= builder.file_field :image %>
  <% end %>
  <div>
    <%= submit_tag "Upload" %>
  </div>
  <% end %>
</div>

Another page where we use that same do |builder| syntax gives the same unexpected kDO_BLOCK error as this page.

We are using paperclip to upload the pictures. On my friend’s laptop however this issue doesn’t seem to happen at all. We are both running ubuntu, our gemfiles are identical … and the kicker here is, we have both checked out code from the same repo!

  • 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-24T21:19:13+00:00Added an answer on May 24, 2026 at 9:19 pm

    You have a stray comma:

    <%= f.fields_for :profile_pics, ProfilePic.new, do |builder| %>
                                                  ^-- right here
    

    The Ruby parser is looking for another argument for f.fields_for but it sees a block and gets upset, hence the “unexpected kDO_BLOCK” error.

    The second error:

    /home/<...>/profile_pic.html.erb:16: syntax error, unexpected kENSURE, expecting $end
    

    is probably a side effect of the first one but, since there isn’t a line 16 in your posted ERB, I can’t be sure.

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

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

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.