You called:
\Users\MEGHA\sagar_blog>rails generate scaffold post title:string \ body:text
remove the excess \
:
\Users\MEGHA\sagar_blog>rails generate scaffold post title:string body:text
\
is actually a hard blank, which causes the body
field to be called body
(with a blank before the name), this causes the migration file to generate a line t.text : body
instead of t.text :body
, which fails the migration (and probably later will fail other stuff as well).