small medium large xlarge

01 May 2008, 05:28
Patrick Leahy (6 posts)

Hi guys, I’ve had a miserable first week with Ruby - I got to about page 75 in the second edition of the book before I realized that dynamic scaffolding doesn’t work with 2.0.2. At which point, I spent a few more days mucking about on the internet trying to find a tutorial on static scaffolding for rails 2+ - thank God the new edition of the PDF came out before I went insane.

So I went back, followed everything to the letter, and no matter what I do, I get this:

As you can see, the server (Mongrel) is running fine. The products_controller should be running…but for one reason or another, it’s not. Why? Certainly I’m new to this business but I’m pretty sure everything’s in place for it to work.

I’m sure the issue is right in my face - but I’d love a helping hand, or even just a kind word. Thanks in advance. Cheers.

01 May 2008, 13:52
Sam Ruby (634 posts)

Can you retrace your steps for me? How did you install ruby? rails?

From a clean directory, try the following sequence of commands:

ruby -v
gem -v
rails -v
rails depot
ruby script/generate scaffold product title:string description:string image_url:string
rake db:migrate
ruby script/server

What do the first three return? What do you see if you point your browser to http://localhost:3000/products ?

01 May 2008, 15:57
Patrick Leahy (6 posts)

Man, if I could express my profound love for you right now…

Thanks a million. I have no idea why that didn’t work for me earlier, well anyways.

Oh, for the record: ruby: 1.8.6 rails: 2.0.2 gem: 1.0.1

02 May 2008, 09:03
sathish (2 posts)

Hi Patrick Leahy, – In the browser URL is wrong, which was last entered.Instead of products_controller enter only product

Regards, T.Sathish(india)

You must be logged in to comment