I trying to follow the tutorial in Agile Web Development with Rails
Second Ed using Rails 2.1.0. So far I've overcome problems with
missing scaffolding, missing classic_pagination, missing svn (required
to install classic_pagination and no error messages about ) and
default not being supported by MySQL in migrations.
The latest problem appears to be a bug in the scaffolding.
It’s ok to have the second edition, that is a fantastic book, you only need to use the same version of the book. sudo gem install rails -v 1.2.6 should do the job.
Please use the version of rails that is used in the book
Other people have suggested this, but what's the point of learning an
obsolete version of rails when the new one is so different?
The new rails isn't as different as it seems - it's just that all the
differences seem to be magnified by the scaffolding. The only real
difference is the greater emphasis on restful routing, and some new
conventions for controller actions. But like i say if you're using
scaffolding it's very hard to follow.
In your case i'd recommend using the older version of rails to follow
the tutorials. Then, find some RESTful rails tutorials on the net and
follow them using the newer rails - you will stand a much better chance
of understanding what you are doing.
The new rails isn't as different as it seems - it's just that all the
differences seem to be magnified by the scaffolding. The only real
difference is the greater emphasis on restful routing, and some new
conventions for controller actions. But like i say if you're using
scaffolding it's very hard to follow.
I've downloaded the source code for the 3rd ed. of the book and diffed
it against the 2nd ed. It seems that the authors have taken the same
approach as me: they've just called the controller 'products' instead
of 'admin'. (presumably because the ror 2.x generate scaffold script
forces the controller name to be the same as the model) So far so
good ...