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 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? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jan 19, 2:03 pm, suryava <sury...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
2010/1/19 suryava <suryava-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> 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 > > 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?Have a look at the GettingStarted guide at http://guides.rubyonrails.org/ Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.