Programming Books C Java PHP Python Learn more Browse Programming Books

Deliver to your Kindle or other device

Enter a promotion code
or gift card

Try it free

Sample the beginning of this book for free

Deliver to your Kindle or other device

Sorry, this item is not available in
Image not available for
Image not available

To view this video download Flash Player


Ruby on Rails 3 Tutorial: Learn Rails by Example (Addison-Wesley Professional Ruby Series) [Kindle Edition]

Michael Hartl
4.3 out of 5 stars  See all reviews (76 customer reviews)

Digital List Price: $31.99 What's this?
Kindle Price: $17.27
You Save: $14.72 (46%)

Free Kindle Reading App Anybody can read Kindle books—even without a Kindle device—with the FREE Kindle app for smartphones, tablets and computers.

To get the free app, enter your email address or mobile phone number.


Amazon Price New from Used from
Kindle Edition $17.27  
Paperback --  
Hero Quick Promo
Year-End Kindle Daily Deals
Load your library with great books for $2.99 or less each, today only. Learn more
There is a newer edition of this item:
Ruby on Rails Tutorial: Learn Web Development with Rails (2nd Edition) (Addison-Wesley Professional Ruby Series) Ruby on Rails Tutorial: Learn Web Development with Rails (2nd Edition) (Addison-Wesley Professional Ruby Series) 4.2 out of 5 stars (70)
Available for download now.

Book Description

Ruby on Rails™ 3 Tutorial: Learn Rails by Example by Michael Hartl has become a must read for developers learning how to build Rails apps.”

—Peter Cooper, Editor of Ruby Inside


Using Rails 3, developers can build web applications of exceptional elegance and power. Although its remarkable capabilities have made Ruby on Rails one of the world’s most popular web development frameworks, it can be challenging to learn and use. Ruby on Rails™ 3 Tutorial is the solution. Leading Rails developer Michael Hartl teaches Rails 3 by guiding you through the development of your own complete sample application using the latest techniques in Rails web development.


Drawing on his experience building RailsSpace, Insoshi, and other sophisticated Rails applications, Hartl illuminates all facets of design and implementation—including powerful new techniques that simplify and accelerate development.


You’ll find integrated tutorials not only for Rails, but also for the essential Ruby, HTML, CSS, JavaScript, and SQL skills you’ll need when developing web applications. Hartl explains how each new technique solves a real-world problem, and he demonstrates this with bite-sized code that’s simple enough to understand, yet novel enough to be useful. Whatever your previous web development experience, this book will guide you to true Rails mastery.


This book will help you

  • Install and set up your Rails development environment
  • Go beyond generated code to truly understand how to build Rails applications from scratch
  • Learn Test Driven Development (TDD) with RSpec
  • Effectively use the Model-View-Controller (MVC) pattern
  • Structure applications using the REST architecture
  • Build static pages and transform them into dynamic ones
  • Master the Ruby programming skills all Rails developers need
  • Define high-quality site layouts and data models
  • Implement registration and authentication systems, including validation and secure passwords
  • Update, display, and delete users
  • Add social features and microblogging, including an introduction to Ajax
  • Record version changes with Git and share code at GitHub
  • Simplify application deployment with Heroku

Editorial Reviews

Review Michael Hartl’s awesome new Rails Tutorial

The Ruby on Rails3 Tutorial: Learn Rails by Example by Michael Hartl has become a must read for developers learning how to build Rails apps.

—Peter Cooper, editor of Ruby Inside


Very detailed and hands-on Rails Tutorial!

Great job! I’m learning Rails, and found your tutorial to be one of the most detailed and hands-on guides. Besides many details of Rails, it also taught me about Git, Heroku, RSpec, Webrat, and most important (at least to me), it emphasized the Test-Driven Development (TDD) methodology. I learned a lot from your tutorial. Keep up the good job! Thanks so much for sharing it.

—Albert Liu, senior manager, Achievo Corporation.


Ruby on Rails Tutorial is the best!

Just wanted to say that your Ruby on Rails tutorial is the best! I’ve been trying for a while to wrap my head around Rails. Going through your tutorial, I’m finally feeling comfortable in the Rails environment. Your pedagogical style of gradually introducing more complex topics while at the same time giving the reader the instant gratification and a sense of accomplishment with working examples really works for me. I also like the tips and suggestions that give me a sense of learning from a real Rails insider. Your e-mail response to a problem I ran into is an example of your generous sharing of your experience.

—Ron Bingham, CEO, SounDBuytz


I love the writing style of the Rails Tutorial

I love the writing style of the Rails Tutorial, and there is so much content that is different from other Rails books out there, making it that much more valuable...Thanks for your work!

—Allen Ding

About the Author

Michael Hartl is a programmer, educator, and entrepreneur. He coauthored RailsSpace (Addison-Wesley, 2008), and was cofounder and lead developer of Insoshi, a popular social networking platform based on Rails. He previously taught theoretical and computational physics at the California Institute of Technology, earning the Caltech Lifetime Achievement Award for Excellence in Teaching. Michael is a graduate of Harvard College, holds a Ph.D. in physics from Caltech, and is an alumnus of the Y Combinator entrepreneur program. He maintains the Rails Tutorial website at

Product Details

  • File Size: 12389 KB
  • Print Length: 576 pages
  • Simultaneous Device Usage: Up to 5 simultaneous devices, per publisher limits
  • Publisher: Addison-Wesley Professional; 1 edition (December 16, 2010)
  • Sold by: Amazon Digital Services, Inc.
  • Language: English
  • Text-to-Speech: Enabled
  • X-Ray:
  • Word Wise: Not Enabled
  • Lending: Not Enabled
  • Amazon Best Sellers Rank: #149,124 Paid in Kindle Store (See Top 100 Paid in Kindle Store)
  •  Would you like to give feedback on images?

Customer Reviews

Most Helpful Customer Reviews
69 of 75 people found the following review helpful
5.0 out of 5 stars An excellent resource in a wilderness of hell December 27, 2010
Format:Paperback|Verified Purchase
There are as many rails tutorials on the web and in book form as there are ruby methods. An infinite expanse of information - most of it leading to heartbreak and frustration.

Hartl, with this book as well as the first venture, takes the reader by the hand and gently guides him/her/it/them/monkeybacon through the world of ruby and ruby on rails with the excitement and ease a master has when taking students along for a ride.

I have a collection of books and tutorials and, WITHOUT FAIL, each and every one of them ends somewhere with some sort of mistake in code that I've never been able to get over (including the first book by Hartl, by the way). Not so with this one. I completed the project outlined in this book. First time that's happened with any of the other books/tutorials.

As I am a functioning idiot, this is no mean feat. It is quite an accomplishment. Not by me, but by the author.

If you are able to view the tutorial videos, those will make your life that much better.

Buy it. Now.
Was this review helpful to you?
55 of 60 people found the following review helpful
2.0 out of 5 stars Great book but poor Kindle version February 26, 2011
Format:Kindle Edition|Verified Purchase
This is an exceptionally well-written tutorial, probably the best way to learn Ruby on Rails. The Kindle version, however, is very poorly done. Code listings are shown as images on the Kindle -- with small grey font which is very difficult to read even when zoomed-in. Furthermore, text search does not include the code listings and command examples. For example, I needed to find an explanation of the command "rake db:test:prepare" but got back "0 matches found".

Though the Kindle edition is awful, the excellent content is accessible on web pages for free at [...]. There, one can also purchase a (fully searchable) PDF version directly from the author.

I don't know whether it's Amazon's or the publisher's fault, but the Kindle edition of this book is a complete waste of money.
Was this review helpful to you?
18 of 19 people found the following review helpful
5.0 out of 5 stars Simply best-in-class December 28, 2010
Arriving at Rails after a career in finance, it was especially important for me to find a book that took a holistic approach to developing Rails applications. Mr. Hartl's book does an exceptional job of addressing both the structure and function of Ruby on Rails, as well as the most modern methodologies for developing web applications. Without this book, a novice web programmer like myself likely would have missed learning test-driven development (TDD), which is critically interfaced with producing robust applications.

Mr. Hartl has also put together an outstanding series of screencasts, comprising over 15-hours of video, providing an inside look into an advanced user's coding process. The screencasts pay dividends well above their investment of time and money.

A cursory examination of Mr. Hartl's resume, including his teaching awards in physics at Caltech, will evidence his great talent for simplifying the complex. Having explored this book among a half-dozen of its peers, I can attest that it is indeed best-in-class.
Comment | 
Was this review helpful to you?
17 of 18 people found the following review helpful
3.0 out of 5 stars Not a Book for Beginners November 22, 2011
By Eric
This book will most likely overwhelm a beginner. Don't get me wrong the author knows his stuff and is a good teacher but you have to wrap your head around so many other technologies. Git, Rspec, Test Driven development was just too much for me to take in all at one time.

In my opinion those are advanced topics that should be introduced at the end of the book or in another book. My personal belief is you should lay a solid foundation by just learning the basics of Ruby on Rails first and then learn all the extras like Git and Rspec which is icing on the cake. Ruby on Rails = The Cake. Git, Rspec, Test Driven Development = The Icing.

Once you have a solid knowledge of Ruby on Rails then you can learn how to use Git for version control and Rspec for Test Driven Development. I think a good place to start with just learning the basics of Ruby on Rails is Kevin Skoglund's Rails 3 tutorial on After following his tutorial you should have a solid basic foundation and then you'll be ready for Michael Hartl's book. All that being said Michael Hartl's book is very good but might be a little too much on the plate for beginners.
Comment | 
Was this review helpful to you?
16 of 17 people found the following review helpful
5.0 out of 5 stars A must-read for any RoR novice January 6, 2011
While there are tons of other RoR tutorials out there, they all usually reach a point where the gently increasing learning curve suddenly goes vertical. Not so with this book.

The author doesn't make things overly complicated, makes it clear when you need to be aware of new concepts and when not to worry (because it'll be covered later), and while this book does follow the traditional "develop an app while learning" method, it does so while introducing you to tools and techniques that Rails developers use in the real world. Before you know it, you'll be creating new git repos, pushing them to Github, creating branches for new developments and using test driven development (with tools like Rspec) to test your new code. If most of that went over your head *and* you want to learn Rails, you *need* this book.

Interestingly, he demonstrates how you can create working Rails apps with a minimal knowledge of Ruby - which kills the assumption that Rails neophytes need to have a strong grasp of the Ruby language before tackling Rails development.

Combined with 15+ hours of video lessons complementing each chapter of the book, this makes for an essential tool in the arsenal of any aspiring Rails developer.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
1.0 out of 5 stars Horrible
One of the worst, over-complicated, confused computer books I have ever suffered through. Avoid.
Published 2 months ago by Ian Fletcher
5.0 out of 5 stars Five Stars
Published 5 months ago by Winder
3.0 out of 5 stars Good bag of tips and tricks. A bit unwieldy for a beginner
Now that I've been doing a lot of Rails, it's a really nice book to go back to and quickly refer to some useful tips and tricks. Read more
Published 8 months ago by Karthik H
2.0 out of 5 stars kindle version unreadable in parts
i bought this kindle book a while ago and i wondered why i had not read it much. i just opened the book and it all came back to me: i cant read the screen prints, not even with a... Read more
Published 16 months ago by anonymous
5.0 out of 5 stars A really great tutorial, gets you up to speed quickly.
I am a very tough critic of technical books, because so many of them are dirt. But this book honestly shines. Read more
Published 19 months ago by Gregory Lafrance
1.0 out of 5 stars Not a very useful tutorial
Michael Hartlt pulls too much TDD stuff out of left field without any kind of explanation. I am looking to use TDD intelligently. Read more
Published 19 months ago by blacklight
5.0 out of 5 stars great but outdated.
This is the best tutorial on the market. Unfortunately it's outdated and Rails has evolved so much since this book was written. The book needs an update.
Published 19 months ago by Omar Kettani
5.0 out of 5 stars Great book for teh n00b
I've been twiddling bits for *cough* years and am familiar with a few programming languages, but Ruby and Rails have always been obscure to me. Read more
Published 23 months ago by frosty j hammer
5.0 out of 5 stars Good for getting upto speed on Rails 3
This book felt like learning directly from a professional Rails dev. You get brought up speed on the proper way to develop software using git and TDD. Read more
Published 23 months ago by Harry Moreno
2.0 out of 5 stars Very disappointed. Looks like I bought the wrong edition
I am stuck in chapter 3. The examples for testing the titles of static pages just don't work. I am new to RoR so I can't really tell if the examples are broken because I am using... Read more
Published on December 7, 2012 by ravis
Search Customer Reviews
Search these reviews only

More About the Author

Michael Hartl is the author of the Ruby on Rails Tutorial, the leading introduction to web development with Ruby on Rails. His prior experience includes writing and developing RailsSpace, an extremely obsolete Rails tutorial book, and developing Insoshi, a once-popular and now-obsolete social networking platform in Ruby on Rails. In 2011, Michael received a Ruby Hero Award for his contributions to the Ruby community. He is a graduate of Harvard College, has a Ph.D. in Physics from Caltech, and is an alumnus of the Y Combinator entrepreneur program.

What Other Items Do Customers Buy After Viewing This Item?


There are no discussions about this product yet.
Be the first to discuss this product with the community.
Start a new discussion
First post:
Prompts for sign-in

Look for Similar Items by Category