Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Migration Issue

#6360

Hi
I started using Rails recently about 2 months ago please excuse my English. I start with creating new rails app after that i run generator to generate a scaffold and then i run migration to migrate the database it gives me the following error

$ rake db:migrate (in User/Sites/app) rake aborted!
/Users/apple2/Sites/app/db/migrate/20110202061554_create_pages.rb:4: syntax error, unexpected '\n', expecting tCOLON2 or '[' or '.'

(See full trace by running task with --trace)

what happens it adds a extra comma in migration file that causes the problem
I have found a way around i thought let me just inform to Rails core team so that they can fix it.
I have attached screen shots as well you can have look

cheers

Reported by Ally Raza · February 2nd, 2011 @ 06:25 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Rohit Arondekar
    Rohit Arondekar
    • Importance changed from to Low

    Can you please mention the full command you used to generate the scaffold.

    February 2nd, 2011 @ 10:02 AM

  2. Ally Raza
    Ally Raza

    rails generate scaffold Page title:string, body:text

    February 2nd, 2011 @ 10:28 AM

  3. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to invalid

    Try this

    rails generate scaffold Page title:string body:text
    

    You don't need a comma to separate the fields.

    February 2nd, 2011 @ 10:30 AM