hello folks!! i am very interested in working on RoR, so what i did was to get started on this framework. So what i did was to get hold of some tutorials....ok let me come to the point 1. first and foremost i created 3 databases: contact_development, contact_production, contact_test. In each of these databases i created a table called "people". in each of these tables i entered 2 record sets. 2.Then i went to c:/ruby and typed this command: rails -d mysql contact 3. Next what i did is typed this command: ruby script/generate scaffold Person 4. then this command: ruby script/server 5. now, when i browse to this url: http://localhost:3000/people, it shows me the listing for the 2 records, however the actual values do not display, what i mean to say is that there r 2 rows each with show, edit, destroy links but not the values from the DB against them..... also in the edit and the add pages i do not get the corresponding text boxes....however all the other buttons like "back" submit" are there...also if i explicitly make changes in the view files then the text boxes appear and the values get submitted to the db correctly..... please can anyone tell me what mistake i might have made, due to which this problem occurs? i shall be really grateful to u guys..... --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Apr-15 09:20 UTC
Re: problems getting the scaffold command working properly
On 15 Apr 2008, at 08:45, durgesh wrote:> > hello folks!! > > i am very interested in working on RoR, so what i did was to get > started on this framework. So what i did was to get hold of some > tutorials....ok let me come to the point > > 1. first and foremost i created 3 databases: contact_development, > contact_production, contact_test. In each of these databases i created > a table called "people". in each of these tables i entered 2 record > sets.You don''t really wanted to be editing the database schema yourself. That''s what migrations are fore> > 2.Then i went to c:/ruby and typed this command: rails -d mysql > contact > 3. Next what i did is typed this command: ruby script/generate > scaffold Person > 4. then this command: ruby script/server > 5. now, when i browse to this url: http://localhost:3000/people, it > shows me the listing for the 2 records, however the actual values do > not display, what i mean to say is that there r 2 rows each with show, > edit, destroy links but not the values from the DB against them.....The issue here is that the scaffolding has changed substantially since the tutorials you are following were written (it''s no longer a dynamic scaffold). This has caused a certain amount of confusion but there have been some helpful posts here and blog articles that help bridge the gap (i''m sure you''ll be able to find them now you know what the problem is. The executive summary is that now you''d type something like ruby script/generate person name:string age:integer address:string 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
oh thanks a ton dude! that worked for me.....thanks a lot....really grateful to u..... On Apr 15, 10:20 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 15 Apr 2008, at 08:45, durgesh wrote: > > > > > hello folks!! > > > i am very interested in working on RoR, so what i did was to get > > started on this framework. So what i did was to get hold of some > > tutorials....ok let me come to the point > > > 1. first and foremost i created 3 databases: contact_development, > > contact_production, contact_test. In each of these databases i created > > a table called "people". in each of these tables i entered 2 record > > sets. > > You don''t really wanted to be editing the database schema yourself. > That''s what migrations are fore > > > > > 2.Then i went to c:/ruby and typed this command: rails -d mysql > > contact > > 3. Next what i did is typed this command: ruby script/generate > > scaffold Person > > 4. then this command: ruby script/server > > 5. now, when i browse to this url:http://localhost:3000/people, it > > shows me the listing for the 2 records, however the actual values do > > not display, what i mean to say is that there r 2 rows each with show, > > edit, destroy links but not the values from the DB against them..... > > The issue here is that the scaffolding has changed substantially since > the tutorials you are following were written (it''s no longer a dynamic > scaffold). This has caused a certain amount of confusion but there > have been some helpful posts here and blog articles that help bridge > the gap (i''m sure you''ll be able to find them now you know what the > problem is. > The executive summary is that now you''d type something like ruby > script/generate person name:string age:integer address:string > > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---