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 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</table>\n\n<br />\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: <td><%= link_to ''Edit'', edit_ticket_path(ticket) %></td> 19: <td><%= link_to ''Destroy'', ticket, :confirm => ''Are you sure?'', :method => :delete %></td> 20: </tr> 21: <% end %> 22: </table> 23: 24: <br /> I usually run the scaffold command and never had this issue before Thanks -- Posted via http://www.ruby-forum.com/.
Andrew Timberlake
2009-May-14 05:20 UTC
Re: Keep getting this error after running scaffold command
On Thu, May 14, 2009 at 7:04 AM, Zayd Connor <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > 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 > 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</table>\n\n<br />\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: <td><%= link_to ''Edit'', edit_ticket_path(ticket) %></td> > 19: <td><%= link_to ''Destroy'', ticket, :confirm => ''Are you sure?'', > :method => :delete %></td> > 20: </tr> > 21: <% end %> > 22: </table> > 23: > 24: <br /> > > > I usually run the scaffold command and never had this issue before > > ThanksShould you have the ''#'' after seat? Have you tried it without the ''#''? Perhaps seat_no Andrew Timberlake http://ramblingsonrails.com http://www.linkedin.com/in/andrewtimberlake "I have never let my schooling interfere with my education" - Mark Twain
# is a special character for ruby. All that follows to the end of line is a comment. On May 13, 7:04 pm, Zayd Connor <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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 tohttp://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</table>\n\n<br />\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: <td><%= link_to ''Edit'', edit_ticket_path(ticket) %></td> > 19: <td><%= link_to ''Destroy'', ticket, :confirm => ''Are you sure?'', > :method => :delete %></td> > 20: </tr> > 21: <% end %> > 22: </table> > 23: > 24: <br /> > > I usually run the scaffold command and never had this issue before > > Thanks > -- > Posted viahttp://www.ruby-forum.com/.
Zayd Connor
2009-May-14 05:43 UTC
Re: Keep getting this error after running scaffold command
Andrew Timberlake wrote:> On Thu, May 14, 2009 at 7:04 AM, Zayd Connor > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> 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 Timberlake > http://ramblingsonrails.com > http://www.linkedin.com/in/andrewtimberlake > > "I have never let my schooling interfere with my education" - Mark TwainNo 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 -- Posted via http://www.ruby-forum.com/.
Andrew Timberlake
2009-May-14 06:47 UTC
Re: Keep getting this error after running scaffold command
On Thu, May 14, 2009 at 7:43 AM, Zayd Connor <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Andrew Timberlake wrote: >> On Thu, May 14, 2009 at 7:04 AM, Zayd Connor >> <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> 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 Timberlake >> http://ramblingsonrails.com >> 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? > > ThanksJust go into the database ./script/dbconsole and run drop table tickets Andrew Timberlake http://ramblingsonrails.com http://www.linkedin.com/in/andrewtimberlake "I have never let my schooling interfere with my education" - Mark Twain