Re: Problems with Scaffolding ...

snacktime
Tue, 25 Oct 2005 19:10:14 -0000

On 10/25/05, Hendie Dijkman
<ruby-Vki3jUAxBCcyzzc7d281tmfPcZCv/ETZ@public.gmane.org>
wrote:
>
> I installed InstantRails (current config here:
> http://instantrails.rubyforge.org/wiki/wiki.pl?Release_Notes), and tried
> the depot example from the pragmatic Rails book. I got to generating the
> scaffold on page 57, and got the following response:
>
> C:\InstantRails\rails_apps\depot>ruby script/generate scaffold Product
> Admin
> dependency model
> exists app/models/
> exists test/unit/
> exists test/fixtures/
> create app/models/product.rb
> create test/unit/product_test.rb
> create test/fixtures/products.yml
> exists app/controllers/
> exists app/helpers/
> create app/views/admin
> exists test/functional/
> create app/controllers/admin_controller.rb
> create test/functional/admin_controller_test.rb
> create app/helpers/admin_helper.rb
> create app/views/layouts/admin.rhtml
> create public/stylesheets/scaffold.css
> create app/views/admin/list.rhtml
> create app/views/admin/show.rhtml
> create app/views/admin/new.rhtml
> create app/views/admin/edit.rhtml
> error Before updating scaffolding from new DB schema, try creating a table
> for your model (Product)
>
> I did a bit of looking around on the web, and it seems there are others
> who have the same problem I have. And oh, btw, I tried this on two
different
> WinXP Prof boxes, both gave the same results. I even tried the suggestion
> one blogger and did a "gem update", but that just seemed to make
matters
> worse.
>
> I got hooked on Dave Thomas'' talks at the recent Calgary NFJS, and
would
> REALLY like to take RoR for a spin, but this problem has me stumped!
>

Do you have a ''products'' table in the database?
Is database.yml correctly configured so that rails can actually connect?

Look at your database logs to see if rails is even connecting. Then check to
make sure your ''products'' database exists and is writable by
the database
user configured in database.yml.

Chris