# Keep getting this error after running scaffold command

**URL:** <https://www.ruby-forum.com/t/keep-getting-this-error-after-running-scaffold-command/167933>\
**Category:** Rails\
**Created:** [May 14, 2009, 7:04am UTC](https://www.ruby-forum.com/t/keep-getting-this-error-after-running-scaffold-command/167933 "2009-05-14T07:04:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![devrubygem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@devrubygem](https://www.ruby-forum.com/u/devrubygem)\
**Post date:** [May 14, 2009, 7:04am UTC](https://www.ruby-forum.com/t/keep-getting-this-error-after-running-scaffold-command/167933/1 "2009-05-14T07:04:09Z")

</div>

I ran ruby script/generate scaffold Ticket artist:string seat#:integer  
price:integer ticket\_price:float in my terminal  
Then I entered rake db:migrate

I went to [http://localhost:3000/tickets](http://localhost:3000/tickets)  
and I’m getting this error shown below,

Showing app/views/tickets/index.html.erb where line #21 raised:

compile error  
/Users/musdev/peepcode/views\_demo/app/views/tickets/index.html.erb:21:  
syntax error, unexpected kEND, expecting ‘)’  
; end ; @output\_buffer.concat “\n\n\n  
\n\n”  
^  
/Users/musdev/peepcode/views\_demo/app/views/tickets/index.html.erb:28:  
syntax error, unexpected kENSURE, expecting ‘)’  
/Users/musdev/peepcode/views\_demo/app/views/tickets/index.html.erb:30:  
syntax error, unexpected kEND, expecting ‘)’

Extracted source (around line #21):

18: \<%= link\_to ‘Edit’, edit\_ticket\_path(ticket) %\>  
19: \<%= link\_to ‘Destroy’, ticket, :confirm =\> ‘Are you sure?’,  
:method =\> :delete %\>  
20:   
21: \<% end %\>  
22:   
23:  
24:

I usually run the scaffold command and never had this issue before

Thanks

---

<div class="post-metadata">

**Author:** ![devrubygem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@devrubygem](https://www.ruby-forum.com/u/devrubygem)\
**Post date:** [May 14, 2009, 7:21am UTC](https://www.ruby-forum.com/t/keep-getting-this-error-after-running-scaffold-command/167933/2 "2009-05-14T07:21:36Z")

</div>

On Thu, May 14, 2009 at 7:04 AM, Zayd C.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> compile error
> 
> I usually run the scaffold command and never had this issue before
> 
> Thanks

Should you have the ‘#’ after seat?  
Have you tried it without the ‘#’? Perhaps seat\_no

Andrew T.  
[http://ramblingsonrails.com](http://ramblingsonrails.com)  
[http://www.linkedin.com/in/andrewtimberlake](http://www.linkedin.com/in/andrewtimberlake)

“I have never let my schooling interfere with my education” - Mark Twain

---

<div class="post-metadata">

**Author:** ![devrubygem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@devrubygem](https://www.ruby-forum.com/u/devrubygem)\
**Post date:** [May 14, 2009, 7:23am UTC](https://www.ruby-forum.com/t/keep-getting-this-error-after-running-scaffold-command/167933/3 "2009-05-14T07:23:57Z")

</div>

# is a special character for ruby. All that follows to the end of

line is a comment.

On May 13, 7:04 pm, Zayd C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![devrubygem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@devrubygem](https://www.ruby-forum.com/u/devrubygem)\
**Post date:** [May 14, 2009, 7:43am UTC](https://www.ruby-forum.com/t/keep-getting-this-error-after-running-scaffold-command/167933/4 "2009-05-14T07:43:18Z")

</div>

Andrew T. wrote:

> On Thu, May 14, 2009 at 7:04 AM, Zayd C.  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > compile error
> > 
> > I usually run the scaffold command and never had this issue before
> > 
> > Thanks
> 
> Should you have the ‘#’ after seat?  
> Have you tried it without the ‘#’? Perhaps seat\_no
> 
> Andrew T.  
> [http://ramblingsonrails.com](http://ramblingsonrails.com)  
> [http://www.linkedin.com/in/andrewtimberlake](http://www.linkedin.com/in/andrewtimberlake)
> 
> “I have never let my schooling interfere with my education” - Mark Twain

No I haven’t tried yet, can i run the same command again of course  
without the # ?  
or do I have to delete the ticket table first? How do I go about  
removing the ticket table?

Thanks

---

<div class="post-metadata">

**Author:** ![devrubygem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@devrubygem](https://www.ruby-forum.com/u/devrubygem)\
**Post date:** [May 14, 2009, 8:48am UTC](https://www.ruby-forum.com/t/keep-getting-this-error-after-running-scaffold-command/167933/5 "2009-05-14T08:48:17Z")

</div>

On Thu, May 14, 2009 at 7:43 AM, Zayd C.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > 
> 
> without the # ?  
> or do I have to delete the ticket table first? How do I go about  
> removing the ticket table?
> 
> Thanks

Just go into the database ./script/dbconsole and run drop table tickets

Andrew T.  
[http://ramblingsonrails.com](http://ramblingsonrails.com)  
[http://www.linkedin.com/in/andrewtimberlake](http://www.linkedin.com/in/andrewtimberlake)

“I have never let my schooling interfere with my education” - Mark Twain
