Beginner problem

Hello.

Unfortunately, I think the tutorial that you are working with is a bit out of date. I think you'll probably run into trouble with most of the Rails tutorials out there right now if you're using Rails 2.0.x because scaffold has been deprecated. If you Google for 'rails scaffold deprecated' or something similar you should be able to find some more information about it.

Katie

I forgot to add... I think you might be able to find some more information about the Rails 2/scaffold thing on this forum too.

Basically, with the new scaffold you should do something like this:

ruby script/generate scaffold Friend name:string

This will create the Model, the Controller and the Migration that will create the columns you specified (in this case, name).

Then you just need to run rake db:migrate and thats it. Remember to delete the table you have created before running the Migration. You should always edit the Database trough Migrations.

The problem is that the new scaffold is now RESTful, and I bet the tutorials you are looking at are not based on RESTful specs. Maybe you should install Rails 1.2.6 and specify this version on environment.rb so that you can play with the old scaffold...

Felipe

I think it is too soon since 2.0 was released. If there is any tutorial out there covering 2.0, I doubt it is going to be very complete and aimed at beginners.

I would recommend AWDWR, 2nd edition. It covers Rails 1.2.6, but still it is very complete. It tells you exactly what you are doing and why. It has a very good tutorial and after that it covers Rails as a whole.

I started working with it in october. By now I am working on my own app, reading the part of the book that is not related to the depot app (the app you develop on the book as a tutorial) and doing coding in my free time. I actually never finished the depot app (not that the guide is useless or flawed or anything, it was mostly because of how I learn things).

I've started converting my app to 2.0 in baby steps. Everything new I create is RESTful, but I'm not in a hurry to refactor the "old" code. I think it is easier to "learn" 2.0 if you know 1.2, but thats my opinion.

I would advise you to go trough and create the depot app (from the AWDWR book) using 1.2.6. After you are done, you will be more prepared to start creating your own app using 2.0.

AWDWR: http://www.amazon.com/Agile-Web-Development-Rails-2nd/dp/0977616630/ref=sr_1_1?ie=UTF8&s=books&qid=1198382546&sr=1-1