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.
on 2007-03-25 14:58
on 2007-03-25 15:06
Marco wrote: > 2) set config/database.yml > 3) rails ruby script/generate scaffold link Admin > dependency model > > 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.
on 2007-03-25 16:34
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
on 2007-03-25 20:12
On Mar 25, 8:32 am, "Marco" <linedicons...@gmail.com> wrote: > I am still follow the book .. > > But I doesnt undestand the file /sql/create.sql Hi, 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.