Rails 2.0 scaffold

Hey guys,
I posted the other day about scaffold not working and i was told that it
was rails 2.0 doing this. (btw i’m using adgile web development)
I have read on the internet that you need to put extra stuff like title,
description…
So i did this:

C:\ruby\depot>ruby script\generate scaffold Product Admin id:int
title:varchar(1
00) description:text image_url:varchar(200) price:decimal(10,2)

and i got the same error as i got when i didn’t put the extra stuff in
here is the error:

  exists  app/models/
  exists  app/controllers/
  exists  app/helpers/
  exists  app/views/products
  exists  app/views/layouts/
  exists  test/functional/
  exists  test/unit/

wrong number of arguments (1 for 2)

I no that it says exists but the main point is that i can’t scaffold
now.
How can i fix this?
Thanks
Chris

I recently put online a short tutorial which you may find useful. This
is mainly to help users of our IDE, Ruby In Steel, but it covers the
essential details of the Rails 2 scaffold generator syntax so it may
help you over this barrier :wink:

http://www.sapphiresteel.com/How-To-Create-A-Blog-With-Rails-2

best wishes
Huw

I still dont get it
What am i doing wrong when i put this in

C:\ruby\depot>ruby script\generate scaffold Product Admin id:int
title:varchar(1
00) description:text image_url:varchar(200) price:decimal(10,2)

You’re specifying (100), (200) and (10,2) when it’s not needed.

On Dec 22, 2007 9:18 PM, Chris W. [email protected]
wrote:


Ryan B.
http://www.frozenplague.net
Feel free to add me to MSN and/or GTalk as this email.

Still got the same result

It’s because yo’re providing Product and Admin. Because of Rails
recent conversion to REST, the scaffold generator only generates
controllers based on the model name, in this case you’d have
Product/ProductsController. The reason it’s saying the arguments are
wrong is because it thinks Admin is supposed to be a field and you
didn’t provide a type.

Also, you can leave the sizes off I think. At least, OSX didn’t like
them being on there.

–Jeremy

On Dec 22, 2007 4:32 AM, Chris W. [email protected]
wrote:

  1. description:text image_url:varchar(200) price:decimal(10,2)
    exists test/unit/


http://www.jeremymcanally.com/

My books:
Ruby in Practice

My free Ruby e-book
http://www.humblelittlerubybook.com/

My blogs:
http://www.mrneighborly.com/
http://www.rubyinpractice.com/

Windows shell would, of course, give you BSOD.

On Dec 22, 7:21 am, Frederick C. [email protected]

On 22 Dec 2007, at 15:13, Jeremy McAnally wrote:

It’s because yo’re providing Product and Admin. Because of Rails
recent conversion to REST, the scaffold generator only generates
controllers based on the model name, in this case you’d have
Product/ProductsController. The reason it’s saying the arguments are
wrong is because it thinks Admin is supposed to be a field and you
didn’t provide a type.

Also, you can leave the sizes off I think. At least, OSX didn’t like
them being on there.
You might need to escape them, otherwise the shell might claim them
for its own (at least bash does, no idea what the windows shell would
do)

Fred

Huw,
I’m getting to the end of a large Rails project of which I developed
on my Windows XP machine. I’d sure like to have the extra money around
Xmas time to buy an Apple, but Santa isn’t helping.
Anyway, I observed that you seem to be in the Windows ‘camp’ while
using Ruby in Steel and wondered if your ‘group?’ might have learned
to address certain problems that occur in developing in the Windows
environment. (Of course I’m going to be hosting the app on a Linux
server, but it’d be nice to see it all really working).

  1. attachment_fu - won’t work with S3 with some kind of timing issue
    that no one can explain?
  2. activerecord emailer? - won’t load emails into the ‘spool’ that are
    served out when resources are available.

Anyway, I’d be grateful to hear from you, or anyone who is able to run
their entire program in a Rails environment on Windows. Many thanks…
Kathy

On Dec 22, 4:24 am, Huw C. <rails-mailing-l…@andreas-

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs