2.0 & "Agile Web Dev..." book

Just running through the first little project (depot) in ‘Agile Web
Development with Rails’. It isn’t scaffolding like it says it should
in the book.

After running:

rails -d mysql depot

then SQLing:

drop table if exists products;
create table products (
id int not null auto_increment,
title varchar(100) not null,
description text not null,
image_url varchar(200) not null,
price decimal(10,2) not null,
primary key (id)
);

then config my database.yml

… it won’t completely scaffold. I get:

script/generate scaffold Product Admin
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 just updated Rails and MySQL, and the MySQL gem. Any tips?

Mac OS X 10.5

That’s because the new scaffold generator only takes one argument: the
model name.

The new scaffolds are RESTful, so they name their controllers after
the model resource they are exposing (e.g., Product →
ProductsController).

–Jeremy

On Dec 27, 2007 1:29 AM, dazonic [email protected] wrote:

then SQLing:

  exists  test/functional/


http://www.jeremymcanally.com/

My books:
Ruby in Practice

My free Ruby e-book

My blogs:

http://www.rubyinpractice.com/

Apologies for my bluntness:

If you had managed to take some time off from your busy life and used
the
wonderful, wonderful search feature near the top right of
http://groups.google.com/group/rubyonrails-talk and simply typed
“Rails 2.0scaffold” you would’ve ran into the ONE HUNDRED AND SIXTY
FOUR!!! posts on
this mailing list about scaffolding in Rails 2.0.

The sheer number of these posts of people complaining about scaffolding
not
working in Rails 2.0 is getting out of hand! Please, in future, google
it.
If you spend 5 minutes googling and you still haven’t found what you’re
looking for, then come here!

Just skip the part on scaffolding. It’s useless.

Like I said, I apologised before hand about my bluntness.

This post has been asked an incredible number of times on this mailing
list
and it does get a bit irritating when people keep posting the same
question.

Thanks Jeremy, much appreciated.

And Ryan, thanks, for your smartarse comment. I’m the last dude to
jump in and ask in forums without searching and hunting through FAQs-
I spent a good hour of ‘my busy life’ busting out searches, I had no
idea what I was looking for. When you’re brand new to something it’s
not easy to know exactly isn’t working properly. So lay off right?

Ryan B. wrote:

Like I said, I apologised before hand about my bluntness.

This post has been asked an incredible number of times on this mailing
list
and it does get a bit irritating when people keep posting the same
question.

Call me crazy, but I’m in favor of a forum culture where nobody needs to
fear insults from the more experienced and everyone is free to ignore
redundant posts.

I’m sorry for my forwardness on the issue. I just think that all these
posts
could’ve been prevented by proper googling, something as simple as
“Rails
2.0 scaffold” would’ve yielded the correct results.

Although, how were people people to know that they were using Rails 2.0,
or
care about what version they were using. Does the book mention a single
version of Rails to use? Simply googling for “Rails scaffold” does not
show
any links to any pages mentioning anything about scaffold being
deprecated,
at least on the first page.

Again, I’m sorry for my forwardness but I did assume that dazonic did
not
google before coming here. I should congratulate him on actually
Googling,
and searching, for an hour, like he purportedly did. Many people don’t
do
that, and it’s a unique quality in dazonic that’s good to see.

On Dec 28, 2007 12:06 PM, Robert H. [email protected]
wrote:

fear insults from the more experienced and everyone is free to ignore
redundant posts.

Posted via http://www.ruby-forum.com/.


Ryan B.

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

I think this sort of post goes against everything the members of the
Ruby/Rails community (at least used to…) stand for. Who does it
hurt if someone posts about something again? If no one feels like
answering them, they will turn to Google; otherwise, people like me
who know the answer don’t mind taking 10 seconds out of their day to
give them an answer.

If you want to talk about googling before you post, then please hit
Google for MINASWAN.

–Jeremy

On Dec 27, 2007 1:41 AM, Ryan B. [email protected] wrote:

If you spend 5 minutes googling and you still haven’t found what you’re
looking for, then come here!

Just skip the part on scaffolding. It’s useless.


http://www.jeremymcanally.com/

My books:
Ruby in Practice

My free Ruby e-book

My blogs:

http://www.rubyinpractice.com/

I have created a screencast that is updated version of onlamp.com
Rolling
With Rails for Rails 2.0, check it out:
Rolling with Ruby on Rails Revised - Rails 2.0

Just download the source code and watch the screencast. Hope it clears
some
of the confusion.

On Dec 26, 2007 10:29 PM, dazonic [email protected] wrote:

Just running through the first little project (depot) in ‘Agile Web
Development with Rails’. It isn’t scaffolding like it says it should
in the book.


http://www.rubyplus.org/
Free Ruby and Rails Screencasts

On Dec 27, 2007 8:49 PM, Jeremy McAnally [email protected]
wrote:

I think this sort of post goes against everything the members of the
Ruby/Rails community (at least used to…) stand for. Who does it
hurt if someone posts about something again? If no one feels like
answering them, they will turn to Google; otherwise, people like me
who know the answer don’t mind taking 10 seconds out of their day to
give them an answer.

If you want to talk about googling before you post, then please hit
Google for MINASWAN.

I’ve got to agree. I find the complaints more grating than repeated
queries. I can easily just leave the queries for others to answer if
I like, the complaints tend to irritate me.

Now then this is Rails-talk not ruby-talk, I wonder if there’s an
equivalent DHHIxSWAx to MINSWAN


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

Here is the Pimped up version of AWDwR depot app:

http://www.rubyplus.org/episodes/19-AWDR-Depot-App-using-Rails-2-version.html

with lot of cool Rails 2.0 features.

On Dec 26, 2007 10:29 PM, dazonic [email protected] wrote:

Just running through the first little project (depot) in ‘Agile Web
Development with Rails’. It isn’t scaffolding like it says it should
in the book.


http://www.rubyplus.org/
Free Ruby and Rails Screencasts

On 28 Dec 2007, at 17:23, Rick DeNatale wrote:

Now then this is Rails-talk not ruby-talk, I wonder if there’s an
equivalent DHHIxSWAx to MINSWAN

Anyone remember the ‘flower’ presentation from railsconf europe 2006 :slight_smile:

Fred

Oops. Sorry to cause an uproar. Apology accepted Ryan :slight_smile:

Thanks heaps for the links guys, awesome.

PS. The MINASWAN joke(?) went straight over my head… our friend
Google didn’t help here either :frowning:

On Dec 30, 2007, at 2:34 AM, Jean-François Trân wrote:

“Matz is nice and so we are nice”

Thanks. I was wondering about that, too.

Peace,
Phillip

Darren :

Oops. Sorry to cause an uproar. Apology accepted Ryan :slight_smile:

Thanks heaps for the links guys, awesome.

PS. The MINASWAN joke(?) went straight over my head… our friend
Google didn’t help here either :frowning:

Google for “Matz is nice and so we are nice”

– Jean-François.

hi, iv the depot app running on solaris! with
the cool tools.
i generated the db schema in netbeans ide.

ochomo

On Dec 30, 2007, at 4:51 PM, Ryan B. wrote:

Peace,
Phillip

Yeah me too, I was too much of a coward to admit it. At least I
admit that I was a coward.

Well a few seconds of googl…er…that is I mean one of the benefits
of MINASWAN is that one doesn’t have to be cowardly about asking
questions :wink:
(And I’ve got way more questions than answers, so this is a good
thing.)

On Dec 31, 2007 2:13 AM, Phillip K. [email protected] wrote:

Yeah me too, I was too much of a coward to admit it. At least I admit that
I was a coward.


Ryan B.

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