Re: Problems with Scaffolding ...

Cody Fauser
Thu, 03 Nov 2005 03:16:41 -0000

Rowan,

Try:

script/generate scaffold Person Admin

You have a model Person, which will use a database table people, due
to the pluralization rules.

Hope this helps,


Cody



On 11/2/05, Rowan Hick
<rowan-qL2YrhN2O5vo4RNKbIU+YqVXKuFTiq87@public.gmane.org>
wrote:
>
>
>
> I''m getting the same problem using latest version of rails, even
> uninstalled/reinstalled. No dice. Latest Beta no dice. Database exists with
> table in it. Using XP Pro SP2, MySQL 5.0. I''m going to try out
tonight on my
> old Powerbook just to make sure it''s not a problem between
Keyboard and
> Chair.
>
>
>
> Initially on a fresh rails install (brand new laptop) couldn''t
connect used
> set old_password query to update user, cool - rails connects, but now
can''t
> generate controller.
>
>
>
> D:\minihaus.serv\testnerd>ruby script/generate scaffold people admin
>
>       exists  app/controllers/
>
>       exists  app/helpers/
>
>       exists  app/views/admin
>
>       exists  test/functional/
>
>   dependency  model
>
>       exists    app/models/
>
>       exists    test/unit/
>
>       exists    test/fixtures/
>
>    identical    app/models/people.rb
>
>    identical    test/unit/people_test.rb
>
>    identical    test/fixtures/peoples.yml
>
>        error  Before updating scaffolding from new DB schema, try creating
a
> tab
>
> le for your model (People)
>
>
>
>
>
> Kindest Regards,
>
>
>
> Rowan
>
>
>
>
>
>  ________________________________
>
>
> From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On
Behalf Of
> Hendie Dijkman
>  Sent: Wednesday, October 26, 2005 8:26 AM
>  To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>  Subject: Re: [Rails] Problems with Scaffolding ...
>
>
>
> Thanks for the quick response Chris.
>
>  Yes, to all of your questions. I created the three databases, users, and
> the products table in the database exactly as per the book. Rails does
> connect, because if I change the username or password in the database.yml
> config file, it complains about not being able to connect.
>
>  I delved into the rails code a little and it seems that error message
comes
> from a create_sandbox method in the scaffold_generator when a
> ActiveRecord::StatementInvalid exception is thrown. Dunno, maybe that
> triggers something with someone who has had similar problems?
>
>
>
> --
>  No virus found in this incoming message.
>  Checked by AVG Free Edition.
>  Version: 7.1.362 / Virus Database: 267.12.6/152 - Release Date: 10/31/2005
>
>
> --
>  No virus found in this outgoing message.
>  Checked by AVG Free Edition.
>  Version: 7.1.362 / Virus Database: 267.12.6/152 - Release Date: 10/31/2005
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>