# Rails 2.0 scaffold

**URL:** <https://www.ruby-forum.com/t/rails-2-0-scaffold/123940>\
**Category:** Rails\
**Created:** [December 22, 2007, 10:32am UTC](https://www.ruby-forum.com/t/rails-2-0-scaffold/123940 "2007-12-22T10:32:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [December 22, 2007, 10:32am UTC](https://www.ruby-forum.com/t/rails-2-0-scaffold/123940/1 "2007-12-22T10:32:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [December 22, 2007, 11:24am UTC](https://www.ruby-forum.com/t/rails-2-0-scaffold/123940/2 "2007-12-22T11:24:23Z")

</div>

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 😉

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

best wishes  
Huw

---

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [December 22, 2007, 11:48am UTC](https://www.ruby-forum.com/t/rails-2-0-scaffold/123940/3 "2007-12-22T11:48:16Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [December 22, 2007, 12:10pm UTC](https://www.ruby-forum.com/t/rails-2-0-scaffold/123940/4 "2007-12-22T12:10:42Z")

</div>

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

On Dec 22, 2007 9:18 PM, Chris W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> >

–  
Ryan B.

> **[frozenplague.net](http://www.frozenplague.net)**
>
> This domain may be for sale!

Feel free to add me to MSN and/or GTalk as this email.

---

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [December 22, 2007, 12:13pm UTC](https://www.ruby-forum.com/t/rails-2-0-scaffold/123940/5 "2007-12-22T12:13:07Z")

</div>

Still got the same result

---

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [December 22, 2007, 4:14pm UTC](https://www.ruby-forum.com/t/rails-2-0-scaffold/123940/6 "2007-12-22T16:14:45Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 1. description:text image\_url:varchar(200) price:decimal(10,2)  
> exists test/unit/
> 
> >

–  
[http://www.jeremymcanally.com/](http://www.jeremymcanally.com/)

My books:  
Ruby in Practice

> **[Ruby in Practice](https://www.manning.com/books/ruby-in-practice)**
>
> Like Ruby itself, Ruby in Practice will make you more productive. The book shows you practical techniques and strategies for small projects and large-scale environments. A cookbook-style reference, it gives you concrete examples of systems...

My free Ruby e-book

> **[Site not found · DreamHost](http://www.humblelittlerubybook.com/)**
>
> The owner of this domain has not yet uploaded their website.

My blogs:

> **[Site not found · DreamHost](http://www.mrneighborly.com/)**
>
> The owner of this domain has not yet uploaded their website.

[http://www.rubyinpractice.com/](http://www.rubyinpractice.com/)

---

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [December 23, 2007, 12:17pm UTC](https://www.ruby-forum.com/t/rails-2-0-scaffold/123940/7 "2007-12-23T12:17:42Z")

</div>

Windows shell would, of course, give you BSOD.

On Dec 22, 7:21 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [December 22, 2007, 4:22pm UTC](https://www.ruby-forum.com/t/rails-2-0-scaffold/123940/8 "2007-12-22T16:22:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [December 23, 2007, 3:25pm UTC](https://www.ruby-forum.com/t/rails-2-0-scaffold/123940/9 "2007-12-23T15:25:07Z")

</div>

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-
