This is a big Frequently Asked Question, so here's my answer:
1. Agile Web Development with Rails
2. Ruby for Rails
3. The Ruby Way
If you're a newbie, start with 1 and go to 3. If you're an experienced programmer, start with 3 and go to 1.
If you're a newbie, read Ruby for Rails at least three times. If you're an experienced programmer, read the last five chapters at least twice.
I'm assuming, of course, that you want to be good at what you do.
Here's why these are the books that'll get you there.
Agile Web Dev will give you the Rails overview; The Ruby Way will teach you how to program Ruby; Ruby for Rails is where these two things meet. That's why it's in the middle whether you have experience or not. If you're experienced you'll want to understand how to think in Ruby, and how Rails is an extension of that. If you're a newbie you'll want to build something just to build it, and then learn how you should have done it.
Other popular books include Programming Ruby (the pickaxe book), O'Reilly's Ruby Cookbook, and why's Poignant Guide. why's book is insane, but that's a good thing. The Ruby Cookbook is good, but a bit predictable. O'Reilly only issued it after the Rails bandwagon started picking up steam. I think there are a couple other books from O'Reilly as well. They're probably good. O'Reilly has pretty dependable standards of quality, although they have started slipping a bit now and then. Programming Ruby is popular but I wasn't into it. The same authors wrote The Pragmatic Programmer, which is much better. Every programmer should read that.