If you’re just getting started or want to learn about Rails in general, check the Rails Guides.
Agile Web Development with Rails will teach you all you need to know about Ruby and Rails 4 to build killer web applications. For more advanced material, Rails core member José Valim has written Crafting Rails 4 Applications.
See all the other Ruby on Rails books at Amazon.
why’s (poignant) guide to Ruby is unlike any other guide to programming you have ever read. It features talking foxes, bizzare sidebars, and more crazy humor than most people can handle without loud chuckles.