Hi ! I am a newbie ! I want to use scaffold ! I dont know if I undestand everything right ! 1) create table in mysql (I use mysql query browser) 2) set config/database.yml ---------------- adapter: mysql database: hms host: 127.0.0.1 username: root password: socket: /var/run/mysqld/mysqld.sock ----- 3) rails ruby script/generate scaffold link Admin --------------- tulap@Yumi:~/rails/howmanystep$ ruby script/generate scaffold linkP Admin exists app/controllers/ exists app/helpers/ exists app/views/admin exists app/views/layouts/ exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ identical app/models/link_p.rb identical test/unit/link_p_test.rb identical test/fixtures/link_ps.yml error Before updating scaffolding from new DB schema, try creating a table for your model (LinkP) -------------------------- Where is my error ? Thanks !!! M. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Marco wrote:> Hi ! > > I am a newbie ! > > I want to use scaffold ! > > I dont know if I undestand everything right ! > > 1) create table in mysql (I use mysql query browser) > > 2) set config/database.yml > ---------------- > adapter: mysql > database: hms > host: 127.0.0.1 > username: root > password: > socket: /var/run/mysqld/mysqld.sock > ----- > > > 3) rails ruby script/generate scaffold link Admin > > --------------- > > tulap@Yumi:~/rails/howmanystep$ ruby script/generate scaffold linkP > Admin > exists app/controllers/ > exists app/helpers/ > exists app/views/admin > exists app/views/layouts/ > exists test/functional/ > dependency model > exists app/models/ > exists test/unit/ > exists test/fixtures/ > identical app/models/link_p.rb > identical test/unit/link_p_test.rb > identical test/fixtures/link_ps.yml > error Before updating scaffolding from new DB schema, try > creating a table for your model (LinkP) > -------------------------- > > > Where is my error ? > > Thanks !!! > > M. >Hi Marco, You need to create a model and a table for it before you can generate a scaffold for it. I would recommend that you follow one of the many online tutorials for Ruby on Rails. Do let us know if you have trouble finding a good one - I think there''s one called Rollin on Rails on onLamp.com but I don''t have the link handy - Google should be able to find it for you. Cheers Mohit. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I am still follow the book .. But I doesnt undestand the file /sql/create.sql This is the model ? how to create this from phpmysql or from mysql query browser? Thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Mar 25, 8:32 am, "Marco" <linedicons...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am still follow the book .. > > But I doesnt undestand the file /sql/create.sqlHi, Marco. If by the book you mean Agile Web Dev, you should get the second edition or read up on migrations -- it''s a much more elegant and useful way to create your db than using .sql files. That said, could you post the error messages you get when you try to import the .sql file and the contents of the file? Perhaps there''s a typo that new eyes will spot. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---