Goog RoR 2.0 Book

I am new to learning RoR, and am finding it difficult to read the documentation, which I feel seems fairly inadequate in regards to the current version. Additionally, I can't find any published or to be published books that focus on Rails. Any help would be appreciated!

:slight_smile:

Howe

Look for Agile Web Development, RailsSpace, and the Rails Cookbook.

-Ryan

I’d start with the Peepcode: peepcode.com

?? I think there are dozens of rails books out now (including outdated 1st editions, Scriptaculous/prototype books, books not yet released, etc) on Amazon. I recommend Black "Ruby for Rails", and i like the Railsspace book also

But the OP didn't say that he had a hard time FINDING books, but that the books he is finding are outdated now that 2.0 is the plat du jour.

David's Ruby for Rails book, as good as it is, is stuck in the late Ruby 1.1 timeframe. From what he's told me he plans to evolve it into a new Ruby book for 1.9 without much, if any, Rails content.

AWDWR 2nd edition, particularly the depot tutorial is difficult for a beginner to adapt to 2.0.

I haven't read RailsSpace, so I can't comment on that.

The best Rails 2.0 dead tree resources to-date, at least as far as I'm aware, such as "The Rails Way" are targeted for people who already have a fair bit of Rails under their belt.

Hi --

David's Ruby for Rails book, as good as it is, is stuck in the late Ruby 1.1 timeframe. From what he's told me he plans to evolve it into

I think you mean 1.8. I never even saw Ruby 1.1 :slight_smile: Or do you mean Rails, rather than Ruby?

a new Ruby book for 1.9 without much, if any, Rails content.

Stay tuned :slight_smile:

David

Yes, I meant Rails 1.1

The RailsSpace book in my opinion is pretty good. I am a total beginner to RoR and the RailsSpace book has been really good for me, so I would certainly recommend it. Next, I would get the two "Rails from Scratch" screencasts from Peepcode, which I thought were simply amazing for picking up the basics of RoR.

--Cory

I find this absolutely frustrating. I find code in a book ________, apply it to my project, only to find out that it's been deprecated. Ok, that's normal.

When I inquire as to what to do to fix it, I'm told to read a book.
Great, which book? I don't mind being told to RTFM, I just would like to find the @#$%^% manual and have some idea of *where* in the manual to find the solution.

Right now I'm trying to find the manual on "map" but have yet to find a starting point as it relates to the problem.

At this point, I'm going "backwards" to a degree, in that I'm completely stymied and will have to focus entirely on ruby in order to create a seemingly simple interface. I have interest in ruby, but it's lesser than for RoR.

-Thufir

ps: if that comes off as bitter, pls ignore the tone (and thank y'all for the help)

If you have a specific problem (with deprecated methods), list it here and I will try and help you find the "right" way to do it. Sorry if I missed you already listing the specific thing you needed help with.

I am posting to this thread to try to prime the pump with a second voice, in hopes that someone might add a note here that address the original post.

It seems that RoR 2.0 has some excellent new features that should make development easier, and websites more full-featured and robust. I already own the AWDWR book, which I bought after wasting too much time trying to understand the online docs.

I don't mind buying a new book every year, if features change (or improve) every year.

So, to repeat the original post ... are there any books that focus on the *current version*?

So, to repeat the original post ... are there any books that focus on the *current version*?   

Maybe this one:

The Rails Way by Obie Fernandez was recently released, and covered RoR 2.0. It's a good book. I recommend it.

Thanks, Chris Benson

Bregor Esgarothian wrote:

The frustration is understandable - as there are no entirely Rails 2.0 books currently available. My recommendations are:

1. Practical Rails Projects by Elton Alameda 2. Akita On Rails "Rails 2.0 Tutorial"

#1 includes a chapter on Rails 2.0 and is written with Rails 2.0 sensibilities. It is also project-based which makes it more newbie- friendly.

#2 is simply awesome in my opinion. It's a great Rails intro AND a great illustration of new Rauls 2.0 goodness.

HTH.

I think the main point of anguish is the fact that many of the really good tutorials and books simply *stop working* because scaffolding was removed. Perhaps a better idea is to write a "book patch" that explains how to use scaffolding under Rails 2.0.x.

Now, YMMV, but here's a short summary (# is my comment, $ is what you type):

Assuming the depot project

# create the project $ rails depot

# create the SQLite database $ rake db:migrate

# install plugins to make scaffolding work as it did pre-2.0 $ ruby script/plugin install scaffolding $ ruby script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination

Follow remainder of tutorial. I'm not sure, but I think this set of steps could jump start a few people who are fighting the disconnect with what's written today and what Rails 2.0.x does.

Hope this helps.

But surely there was a reason why scaffolding was taken out of Rails. They didn’t just put all the features on slips of paper and draw them out of a hat. Scaffolding is a good start, but you end up changing more than 50% of the code afterwards. Do you really think it’s use should be encouraged still? Default scaffolding, as far as I know, does not follow REST conventions, although there is a scaffold_resource which could be used, but again you’ll end up changing most of that code.

I think scaffolding has value when someone wants to get a "flavor" for how Rails will feel. It's a fine way to get up and running fast, cobble in a little Ruby, and figure out if this is the right thing for you. Does it have legs over the long haul? It wasn't intended to; the idea was that one of your iterations would be to replace the scaffolding with real code that reflects your project's needs.

And yes, there are reasons the extracted features were removed from core. The Rails Core team has to decide where to focus and enhance and where to just bug-fix. Scaffolding is clearly not a feature Rails Core wants to put time into advancing. Same for pagination.

Would I encourage use of scaffolding? Not once you are sufficiently up to speed and can hack out all the CRUD just as quickly yourself. While learning -- and particularly in light of the tutorials' reliance on scaffolding for instant gratification -- scaffolding is ok.

Just my $.02

Before the pre-2.0 rails edge became rails edge, script/generate scaffold_resource went away as a command, and took over script/generate scaffold, all Rails 2.0 scaffolds are RESTful now.

Actually in my experience, scaffolding is MORE useful in Rails 2.0 than it was in earlier versions.

Prior to 2.0 I never used scaffolding other than in following the tutorials. After I got my feed wet I tended to just code stuff by hand.

In Rails 2.0 I've been using script/generate scaffold a lot. There are several reasons.

With dynamic scaffolding, you've got nothing to work with when you want to go beyond basic CRUD forms and displays. Sure it's nice that you can add fields to models and don't have to change (the non-existant) views, but it never seemed worth it to me.

The Rails 2.0 scaffold generation, along with restful design is actually much more powerful in getting started.      You get the seven standard controller actions       You get useful tests (well I think you do, you certainly get useful specs if you use the rspec_scaffold verion)       You get the migration as well and can specify initial attributes for your model.

The downside of course is that it just gets you started and you need to manually maintain views as you migrate your models, but it gets you started on a much better path than relying on the old "magical" dynamic scaffolding.

In my spare time, I've started writing a parallel to the depot app in AWDWR 2nd ed, which uses generated scaffolding and a RESTful design. So far I've managed to find about a half a day to work on it and have gotten through some comments on the rails installation and setup chapter and most of the first chapter on the depot app, and have written about 20 pages.

For better or worse though, this has to take a lower priority than billable work, so I can only work on it sporadically. No promises on when I might get it to the point where I'd be willing to embarrass myself by making it public.

Maybe you should open source it? I think it’d be a wonderful project for the community to work on as a group.

+1 for the Rails Way. Probably not a beginner book, but its the definitive Rails book right now.

Nick.

Chris Benson wrote: