small medium large xlarge

30 Mar 2009, 19:55
Arno van Lieshout (1 post)

I am new at programming and therfore following all the examples in the book.

I created the model,vieuws….. with the command ruby script/generate scaffold product \title:string description:text image_url:string.

This worked fine and i got the db/migrate/20090330185223_create_products.rb.

However when I did the rake db:migrate command I got the following error:

(in C:rails/rails_apps/work/depot) rake aborted! ./db/migrate//20090330185223_crate_products.rb:4: syntax error, unexpected $undefined, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END

t.string :\title ^

Can somebody advise what i am doing wrong.

30 Mar 2009, 21:54
Sam Ruby (634 posts)

Per footnote 5 on page 76, “Windows users will need to put the entire command on one line, without the backslash”.

Since you are just getting started, it might be easiest to remove the entire depot folder and start afresh.

10 Apr 2009, 19:14
Kyle Knight (1 post)

I’m on a Mac and the same thing happened to me. I will try deleting the Depot and starting anew.

EDIT: Yup, deleting the Depot and starting over fixed the issue

You must be logged in to comment