Ruby on Rails 2.3 Tutorial: Learn Rails by Example
Michael Hartl
Though of necessity the book focuses on a specific sample application, the emphasis throughout this book is on general principles, so you will have a solid foundation no matter what kind of web application you want to build.