script/generate scaffold Products Admin----not running

hi, i have installed ruby 1.8.6 window version, rails 2.1.0

everything runs fine except SCAFFOLD when i run ruby script/generate scaffold modelname controllername actions e,g. C:depot>ruby script/generate scaffold Product Admin            it gives following error "WRONG NUMBER OF ARGUMENTS (1 FOR 2)" i tried with many dummyprojects and tutorial, BUT if i run    ruby script/generate scaffold modelname e.g ruby script/generate scaffold Product IT'S RUN FINE SEE THE FOLLOWING

D:\svn\trunk\workspace\test>ruby script/generate scaffold Product Admin       exists app/models/       exists app/controllers/       exists app/helpers/       create app/views/products       exists app/views/layouts/       exists test/functional/       exists test/unit/       exists public/stylesheets/       create app/views/products/index.html.erb wrong number of arguments (1 for 2)

D:\svn\trunk\workspace\test>ruby script/generate scaffold Product       exists app/models/       exists app/controllers/       exists app/helpers/       exists app/views/products       exists app/views/layouts/       exists test/functional/       exists test/unit/       exists public/stylesheets/ overwrite app/views/products/index.html.erb? (enter "h" for help) [Ynaqdh] y        force app/views/products/index.html.erb       create app/views/products/show.html.erb       create app/views/products/new.html.erb       create app/views/products/edit.html.erb       create app/views/layouts/products.html.erb       create public/stylesheets/scaffold.css       create app/controllers/products_controller.rb       create test/functional/products_controller_test.rb       create app/helpers/products_helper.rb        route map.resources :products   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       create db/migrate       create db/migrate/20080628070012_create_products.rb

D:\svn\trunk\workspace\test>

BUT RESULTS ARE A BIT DIFFERENT , i am looking for Modelname "Product", Controllername "Admin" and Actions "show.rhtml, new.rhml, edit.rhtml,_form.rhtml"

BUT RESULTS ARE Modelname "Product" , Controllername "Products",and Actions "show.html.erb,new.html.erb,edit.html.erb,index.html.erb"

PLZ HELP ME WHAT'S GOING WRONG thanks sanjay

hi, i have installed ruby 1.8.6 window version, rails 2.1.0

everything runs fine except SCAFFOLD when i run ruby script/generate scaffold modelname controllername actions e,g. C:depot>ruby script/generate scaffold Product Admin           it gives following error "WRONG NUMBER OF ARGUMENTS (1 FOR 2)" i tried with many dummyprojects and tutorial, BUT if i run   ruby script/generate scaffold modelname e.g ruby script/generate scaffold Product IT'S RUN FINE SEE THE FOLLOWING

D:\svn\trunk\workspace\test>ruby script/generate scaffold Product
Admin      exists app/models/      exists app/controllers/      exists app/helpers/      create app/views/products      exists app/views/layouts/      exists test/functional/      exists test/unit/      exists public/stylesheets/      create app/views/products/index.html.erb wrong number of arguments (1 for 2)

D:\svn\trunk\workspace\test>ruby script/generate scaffold Product      exists app/models/      exists app/controllers/      exists app/helpers/      exists app/views/products      exists app/views/layouts/      exists test/functional/      exists test/unit/      exists public/stylesheets/ overwrite app/views/products/index.html.erb? (enter "h" for help) [Ynaqdh] y       force app/views/products/index.html.erb      create app/views/products/show.html.erb      create app/views/products/new.html.erb      create app/views/products/edit.html.erb      create app/views/layouts/products.html.erb      create public/stylesheets/scaffold.css      create app/controllers/products_controller.rb      create test/functional/products_controller_test.rb      create app/helpers/products_helper.rb       route map.resources :products 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      create db/migrate      create db/migrate/20080628070012_create_products.rb

D:\svn\trunk\workspace\test>

BUT RESULTS ARE A BIT DIFFERENT , i am looking for Modelname "Product", Controllername "Admin" and Actions "show.rhtml, new.rhml, edit.rhtml,_form.rhtml"

.rhtml is no longer rails conventions for view templates. The results
below are correct.

BUT RESULTS ARE Modelname "Product" , Controllername "Products",and Actions "show.html.erb,new.html.erb,edit.html.erb,index.html.erb"

PLZ HELP ME WHAT'S GOING WRONG

you don't need the "controllername actions" when using scaffold. a
RESTful controller will be generated for you.

(from the help)

Usage: ./script/generate scaffold ModelName [field:type, field:type]

For example, `scaffold post title:string body:text published:boolean`

Type "ruby script/generate scaffold" for the full help.

Best. MIke

thanks Michael Breen now it's clear to me, thanks for good help,

sanjay shankar

Michael Breen wrote: