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

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 Bigg 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.

--Jeremy

I have created a screencast that is updated version of onlamp.com Rolling With Rails for Rails 2.0, check it out: [

7 Step Framework for Coding Skills Acquisition](7 Step Framework for Coding Skills Acquisition)

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

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 <ducks>

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.

Anyone remember the 'flower' presentation from railsconf europe 2006 :slight_smile:

Fred

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.

Thanks. I was wondering about that, too.

Peace,

Phillip

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.)