# Switching from 1.2.8 -\> 2.1: Scaffold doesn't display MySQL fields

**URL:** <https://www.ruby-forum.com/t/switching-from-1-2-8-2-1-scaffold-doesnt-display-mysql-fields/145205>\
**Category:** Rails\
**Created:** [August 6, 2008, 8:29pm UTC](https://www.ruby-forum.com/t/switching-from-1-2-8-2-1-scaffold-doesnt-display-mysql-fields/145205 "2008-08-06T20:29:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leerlaufprozess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ccd318/32.png) [@Leerlaufprozess](https://www.ruby-forum.com/u/Leerlaufprozess)\
**Post date:** [August 6, 2008, 8:29pm UTC](https://www.ruby-forum.com/t/switching-from-1-2-8-2-1-scaffold-doesnt-display-mysql-fields/145205/1 "2008-08-06T20:29:28Z")

</div>

Hi everyone,

I’m currently trying to switch to the newest version of Rails and I’ve  
already set up a test application and connected it to MySQL using “–  
databse=mysql”. The database is named accordingly, so the app is  
called “the\_app”, the database is called “the\_app\_development” and I  
created a table “posts” inside the database.  
When I create a scaffold using “script/generate scaffold Post” it  
generates all the files but the content (include table headers, form  
fields etc.) doesn’t show up. I get the titles like “Listing posts”  
and also links to Show, Edit, Destroy and New post but not the actual  
content/form fields.

---

<div class="post-metadata">

**Author:** ![Leerlaufprozess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ccd318/32.png) [@Leerlaufprozess](https://www.ruby-forum.com/u/Leerlaufprozess)\
**Post date:** [August 6, 2008, 8:34pm UTC](https://www.ruby-forum.com/t/switching-from-1-2-8-2-1-scaffold-doesnt-display-mysql-fields/145205/2 "2008-08-06T20:34:09Z")

</div>

Hi,

> created a table “posts” inside the database.  
> When I create a scaffold using “script/generate scaffold Post” it  
> generates all the files but the content (include table headers, form  
> fields etc.) doesn’t show up. I get the titles like “Listing posts”  
> and also links to Show, Edit, Destroy and New post but not the actual  
> content/form fields.

yes… the behavior of the scaffold generator changed. Now you have to  
tell Rails which fields/types you want to include in the scaffold.  
Something like

script/generate scaffold Post title:string publicated\_at:datetime

and so on

good luck!

–  
javier ramírez

…i do ruby on rails development in madrid, spain, at  
[http://www.aspgems.com](http://www.aspgems.com)  
…you can find out more about me on [http://formatinternet.wordpress.com](http://formatinternet.wordpress.com)  
and [http://workingwithrails.com/person/5987-javier-ramirez](http://workingwithrails.com/person/5987-javier-ramirez)
