Ruby on Rails Tutorial: Learn Web Development with Rails / Edition 2

Paperback (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $18.94
Usually ships in 1-2 business days
(Save 57%)
Other sellers (Paperback)
  • All (12) from $18.94   
  • New (6) from $28.83   
  • Used (6) from $18.94   


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.

The new edition has been updated to include:
• Fully updated for Rails 3.2 and Ruby 1.9
• Coverage of the new asset pipeline
• Behavior-driven development (BDD) with Capybara and RSpec
• Introduction to Sass (Syntactically Awesome Stylesheets)
• Better automated testing with Guard and Spork
• Rolling your own authentication system with has_secure_password
• An introduction to writing client-friendly tests with Cucumber

Read More Show Less

Editorial Reviews

From the Publisher

Praise for Michael Hartl’s Books and Videos on Ruby on Rails

“My former company (CD Baby) was one of the first to loudly switch to Ruby on Rails, and then even more loudly switch back to PHP (Google me to read about the drama). This book by Michael Hartl came so highly recommended that I had to try it, and the Ruby on Rails™ Tutorial is what I used to switch back to Rails again.”

—From the Foreword by Derek Sivers (

Formerly: founder of CD Baby

Currently: founder of Thoughts Ltd.

“Michael Hartl’s Rails Tutorial book is the #1 (and only, in my opinion) place to start when it comes to books about learning Rails. . . . It’s an amazing piece of work and, unusually, walks you through building a Rails app from start to finish with testing. If you want to read just one book and feel like a Rails master by the end of it, pick the Ruby on Rails™ Tutorial.”

—Peter Cooper, editor, Ruby Inside

“For the self-motivated reader who responds well to the ‘learn by doing’ method and is prepared to put in the effort, then this comes highly recommended.”

—Ian Elliot, reviewer, I Programmer

Ruby on Rails™ Tutorial is a lot of work but if you’re careful and patient, you’ll learn a lot.”

—Jason Shen, tech entrepreneur, blogger at The Art of Ass-Kicking

“Michael Hartl’s Ruby on Rails™ Tutorial seamlessly taught me about not only Ruby on Rails, but also the underlying Ruby language, HTML, CSS, a bit of JavaScript, and even some SQL—but most importantly it showed me how to build a web application (Twitter) in a short amount of time.”

—Mattan Griffel, co-founder & CEO of One Month

“Although I’m a Python/Django developer by trade, I can’t stress enough how much this book has helped me. As an undergraduate, completely detached from industry, this book showed me how to use version control, how to write tests, and, most importantly—despite the steep learning curve for setting up and getting stuff running—how the end-result of perseverance is extremely gratifying. It made me fall in love with technology all over again. This is the book I direct all my friends to who want to start learning programming/building stuff. Thank you Michael!”

—Prakhar Srivastav, software engineer,, Kuwait

“It doesn’t matter what you think you will be developing with in the future or what the framework du jour is; if you want to learn how to build something, there is no better place to start than with this tutorial. And for all the ‘non-technical’ people out there who want to see their ideas come to life, who are considering hiring contractors, paying for a class, or ‘founder dating’ in the search for a technical co-founder: stop. Take a step back. Forget about your idea for a short while and immerse yourself in this tutorial to learn what it takes to put something together. You and your software-related projects will be better for it.”

—Vincent C., entrepreneur and developer

“It has to be the best-written book of its type I’ve ever seen, and I can’t recommend it enough.”

—Daniel Hollands, administrator of Birmingham.IO

“For those wanting to learn Ruby on Rails, Hartl’s Ruby on Rails™ Tutorial is (in my opinion) the best way to do it.”

—David Young, software developer and author at

“This is a great tutorial for a lot of reasons, because aside from just teaching Rails, Hartl is also teaching good development practices.”

—Michael Denomy, full-stack web developer

“Without a doubt, the best way I learned Ruby on Rails was by building an actual working app. I used Michael Hartl’s Ruby on Rails™ Tutorial, which showed me how to get a very basic Twitter-like app up and running from scratch. I cannot recommend this tutorial enough; getting something up and going fast was key; it beats memorization by a mile.”

—James Fend, serial entrepreneur,

“The book gives you the theory and practice, while the videos focus on showing you in person how it’s done. Highly recommended combo.”

—Antonio Cangiano, software engineer, IBM

“The author is clearly an expert at the Ruby language and the Rails framework, but more than that, he is a working software engineer who introduces best practices throughout the text.”

—Greg Charles, senior software developer, Fairway Technologies

“Overall, [Hartl’s] video tutorials should be a great resource for anyone new to Rails.”

—Michael Morin,

“Hands-down, I would recommend this book to anyone wanting to get into Ruby on Rails development.”

—Michael Crump, Microsoft MVP

Read More Show Less

Product Details

  • ISBN-13: 9780321832054
  • Publisher: Addison-Wesley
  • Publication date: 8/10/2012
  • Series: Addison-Wesley Professional Ruby Series
  • Edition number: 2
  • Pages: 566
  • Sales rank: 474,894
  • Product dimensions: 7.00 (w) x 9.00 (h) x 1.20 (d)

Meet 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.

Read More Show Less

Table of Contents

Forewords to the First Edition

About the Author

Chapter 1: From Zero to Deploy

Chapter 2: A Demo App

Chapter 3: Mostly Static Pages

Chapter 4: Rails-Flavored Ruby

Chapter 5: Filling in the Layout

Chapter 6: Modeling Users

Chapter 7: Sign Up

Chapter 8: Sign In, Sign Out

Chapter 9: Updating, Showing, and Deleting Users

Chapter 10: User Microposts

Chapter 11: Following Users


Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)