# Newbie Issue

**URL:** <https://www.ruby-forum.com/t/newbie-issue/181873>\
**Category:** Rails\
**Created:** [January 19, 2010, 3:09pm UTC](https://www.ruby-forum.com/t/newbie-issue/181873 "2010-01-19T15:09:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![suryava](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@suryava](https://www.ruby-forum.com/u/suryava)\
**Post date:** [January 19, 2010, 3:09pm UTC](https://www.ruby-forum.com/t/newbie-issue/181873/1 "2010-01-19T15:09:04Z")

</div>

I am a newbie to RoR. I am struggling to find out why my first RoR  
program does not show me the labels and the fields for my table.

This is what I did so far:

1. Installed RoR 1.8.6.
2. Installed NetBeans 6.8
3. Installed MySQL 5.5
4. Created my first project called “company”
5. Generated a model “employee”
6. Edited the employees.rb file to include 3 new  
columns: :name, :string; :hiredate, :date; :salary, :float
7. Executed the migrate rake task which successfully created the table  
employee on the mysql database with these fields.
8. Generated a scaffold called “employee”.

Then I opened my browser and went to [http://localhost:8080/employees/new](http://localhost:8080/employees/new)

Here is where my troubles begin. The webpage shows just a “Create”  
button, without the labels and text fields for the fields name,  
hiredate or salary.  
If I click on the “Create” button, it says “created a new employee”  
and creates a row with links “show”, “edit” and “destroy”. It does not  
show the name, hiredate or salary.  
When I checked the database, there is an empty row in the employees  
table.  
When I click on the Edit button, it says “successfully updated” but  
still does not show the fields.

What am I missing?

---

<div class="post-metadata">

**Author:** ![suryava](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@suryava](https://www.ruby-forum.com/u/suryava)\
**Post date:** [January 19, 2010, 3:11pm UTC](https://www.ruby-forum.com/t/newbie-issue/181873/2 "2010-01-19T15:11:25Z")

</div>

On Jan 19, 2:03Â pm, suryava [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I am a newbie to RoR. I am struggling to find out why my first RoR  
> program does not show me the labels and the fields for my table.
> 
> This is what I did so far:
> 
> 1. Installed RoR 1.8.6.

I suspect you mean ruby 1.8.6 and some other version of rails (since  
there is no version 1.8.6)

[snip]

> If I click on the “Create” button, it says “created a new employee”  
> and creates a row with links “show”, “edit” and “destroy”. It does not  
> show the name, hiredate or salary.  
> When I checked the database, there is an empty row in the employees  
> table.  
> When I click on the Edit button, it says “successfully updated” but  
> still does not show the fields.
> 
> What am I missing?

Scaffolding does not inspect your database - it will show controls/  
labels for those attributes that you tell it about when you run the  
scaffolding generator

Fred

---

<div class="post-metadata">

**Author:** ![suryava](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@suryava](https://www.ruby-forum.com/u/suryava)\
**Post date:** [January 19, 2010, 5:07pm UTC](https://www.ruby-forum.com/t/newbie-issue/181873/3 "2010-01-19T17:07:55Z")

</div>

2010/1/19 suryava [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> 1. Edited the employees.rb file to include 3 new  
> If I click on the “Create” button, it says “created a new employee”  
> and creates a row with links “show”, “edit” and “destroy”. It does not  
> show the name, hiredate or salary.  
> When I checked the database, there is an empty row in the employees  
> table.  
> When I click on the Edit button, it says “successfully updated” but  
> still does not show the fields.
> 
> What am I missing?

Have a look at the GettingStarted guide at

> **[Ruby on Rails Guides](https://guides.rubyonrails.org/)**
>
> Ruby on Rails Guides

Colin
