# Problem in new.rhtml file

**URL:** <https://www.ruby-forum.com/t/problem-in-new-rhtml-file/69878>\
**Category:** Ruby\
**Created:** [September 25, 2006, 8:21am UTC](https://www.ruby-forum.com/t/problem-in-new-rhtml-file/69878 "2006-09-25T08:21:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrea\_Raimondi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@Andrea\_Raimondi](https://www.ruby-forum.com/u/Andrea_Raimondi)\
**Post date:** [September 25, 2006, 8:21am UTC](https://www.ruby-forum.com/t/problem-in-new-rhtml-file/69878/1 "2006-09-25T08:21:30Z")

</div>

Hello,

My database is MySQL5 and has this structure:

NAME: gigolo\_development

## TABLES

- Gigolos( id,name,description,photo )
- Services( id, name, description, quote )
- Service\_Gigolos( id, service\_id, gigolo\_id )

I’m trying to add a new Service\_Gigolo and this is my current  
new.rhtml page:

# New service\_gigolo

\<%= start\_form\_tag :action =\> ‘create’ %\>  
  
\<%for gigolo in @gigolos%\>  
  
\<%gigolo.column(name)%\>  
  
  
\<%= submit\_tag “Create” %\>  
\<%= end\_form\_tag %\>

\<%= link\_to ‘Back’, :action =\> ‘list’ %\>

When trying to use this page, I get the following errors:

- ./script/…/config/…/app/views/service\_gigolos/new.rhtml:12: syntax  
error

It then says:

Extracted source (around line #12):

10:  
11: \<%= link\_to ‘Back’, :action =\> ‘list’ %\>

I’m very new to ruby, so I’m sure I’m not following the  
rules, but I’m not sure what I’m getting wrong.

I can add a full trace if you think that would help.

Any hints on what is going on or resources I might look at to  
improve my rhtml writing skills?

TIA,

Andrew

---

<div class="post-metadata">

**Author:** ![Andrea\_Raimondi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@Andrea\_Raimondi](https://www.ruby-forum.com/u/Andrea_Raimondi)\
**Post date:** [September 25, 2006, 8:43am UTC](https://www.ruby-forum.com/t/problem-in-new-rhtml-file/69878/2 "2006-09-25T08:43:32Z")

</div>

You’ve forgotten to close your for loop. The error comes after the  
last line because thats the last place it was trying to find your \<%  
end % \>.

You’d probably gain some more incite into rhtml on the rails list  
[http://groups.google.com/group/rubyonrails-talk](http://groups.google.com/group/rubyonrails-talk) .
