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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:08:40+00:00 2026-06-02T08:08:40+00:00

Can someone please tell me what I’m doing wrong here? I get the following

  • 0

Can someone please tell me what I’m doing wrong here? I get the following error when I try to load my form (/posts/show):

SyntaxError in Posts#show

Showing /Users/fkhalid2008/loand/app/views/posts/show.html.erb where line #10 raised:

compile error
/Users/fkhalid2008/loand/app/views/posts/show.html.erb:10: syntax error, unexpected kENSURE, expecting $end
Extracted source (around line #10):

7: </div>
8:   <button type="submit" class="btn span6 large">Submit</button>
9: <% end %>

Here is the relevant code:

POSTS/SHOW

<%= form_remote_tag( :update => 'message', :url => {:controller => 'main', :action => 'send_message', :user_id => @post.user.id }) %> 
<br>
<br />
<br />
<div class="field">
Hello! My name is <%= f.text_field :subject %> and I'm contacting you in response to your ad. I'm interested in learning more so get in touch! Here's my contact details: <%= f.text_field :body %>.
</div>
<button type="submit" class="btn span6 large">Submit</button>
<% end %>
  • 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-06-02T08:08:41+00:00Added an answer on June 2, 2026 at 8:08 am

    You’re trying to use form_tag_remote with a block:

    <%= form_remote_tag ... %>
        ...
    <% end %>
    

    but you left out the do to start the block. Your ERB should look more like this:

    <%= form_remote_tag(...) do %> 
        <!-- ----------------^^ -->
    <% end %>
    

    The ERB processor essentially turns the ERB source inside out to produce a blob of Ruby code to execute; that extra step can lead to some very strange looking errors that are difficult to track down. Part of the conversion from ERB to Ruby involves some exception handling, hence the confusing and odd looking

    unexpected kENSURE, expecting $end
    

    in the error message.

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

Sidebar

Related Questions

Can someone please tell me what I'm doing wrong? I'm using the following arguments
can someone please tell what I'm doing wrong here? \newcommand{\bc}{\small\begin{verbatim}} \newcommand{\ec}{\normalsize\end{verbatim}} and then \bc
Can someone please tell me what I'm doing wrong? I'm trying to put together
Can someone please tell me what I'm doing wrong in this Python code sample?
can someone please tell me what i'm doing wrong? i'm trying to hash a
can someone please tell me what I'm doing wrong in this code? if($id !=
Can someone please tell me how I can implement the following line of pseudo-code.
Can someone please tell me whats wrong with this code. I'm not getting complete
I can't seem to get this text to align vertically. Can someone please tell
Can someone please tell me how to get the DB2 provider to show up

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.