Ruby on Rails Tutorial: Learn Rails by Example

The Ruby on Rails Tutorial book teaches web development with Ruby on Rails, an open-source web framework that powers many of the web's top sites, including Twitter, Hulu, and the Yellow Pages. Ruby on Rails Tutorial gives you all the skills you need to develop and deploy your own custom web applications with Rails. Since Ruby on Rails Tutorial covers Rails 3.0, the latest and greatest version of Rails, the skills you gain will be fully up-to-date. The Ruby on Rails 3 Tutorial book is available for free online and is available for purchase as a PDF download (which also includes a free copy of the Ruby on Rails 2.3 Tutorial book). A companion Ruby on Rails 3 Tutorial screencast series is also in preparation; click here to get a one-time notification (and exclusive coupon code) when the screencasts are ready.

The Ruby on Rails Tutorial book

  • A 100% DRM-free PDF download of the Ruby on Rails 3 Tutorial book (~500 pages)
  • A free copy of the Ruby on Rails 2.3 Tutorial book (~475 pages)
  • Unlimited free updates through the final version of Rails 3.0

Get both books now for only $39!

Discount code:

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… This book by Michael Hartl came so highly recommended that I had to try it, and Ruby on Rails Tutorial is what I used to switch back to Rails again… Though I’ve worked my way through many Rails books, this is the one that finally made me “get” it.

—From the foreword by Derek Sivers

*The Ruby on Rails Tutorial book is also available for free online. Click here for instant access.

Ruby on Rails Tutorial helps you learn Rails by example through the development of a substantial sample application, including a site layout, a user data model, a full registration and authentication system, user-status associations, social "following", and a feed of status updates. Ruby on Rails Tutorial also teaches good software development practices, including version control with Git and GitHub, test-driven development with RSpec, and instant deployment with Heroku. Though of necessity the book focuses on a specific sample application, the emphasis throughout Rails Tutorial is on general principles, so you will have a solid foundation no matter what kind of web application you want to build.

After the Rails 3 ecosystem and book text have fully stabilized, the HTML source of the online version will be available under a Creative Commons license to allow for translation into other languages (among other things). In addition, the print edition, Ruby on Rails 3 Tutorial: Learn Rails by Example, is due out in the fall as part of the Professional Ruby Series (the same series as The Rails 3 Way by Obie Fernandez); it is currently available for pre-order at Amazon, and a "Rough Cut" is available at Safari Books Online. Finally, as noted above, a companion Ruby on Rails Tutorial screencast series is also in production; click here to get a one-time notification (and exclusive coupon code) when the screencasts are ready.

(Some readers have asked about an ePub version of the book. I have tried and failed to make a decent ePub version—the ePub format appears to be terrible for programming books. Nevertheless, Addison-Wesley plans to produce an ePub book as part of the production of the print edition. I have no idea how good it will look, but if having an ePub version is a high priority for you, I suggest waiting for the Addison-Wesley PDF/ePub bundle to come out in the fall.)

The Ruby on Rails Tutorial book comes with a 60-day, no-questions-asked refund policy.

Get both books now for only $39!

Discount code:

About the author of Ruby on Rails Tutorial

Ruby on Rails Tutorial author Michael Hartl is a programmer, educator, and entrepreneur. Michael was coauthor of RailsSpace, a best-selling Rails tutorial book published in 2007, and was cofounder and lead developer of Insoshi, a popular social networking platform in Ruby on Rails. Previously, he taught theoretical and computational physics at the California Institute of Technology (Caltech), where he received the Lifetime Achievement Award for Excellence in Teaching. Michael is a graduate of Harvard College, has a Ph.D. in Physics from Caltech, and is an alumnus of the Y Combinator program.

Praise for the Ruby on Rails Tutorial book

RailsTutorial.org: Michael Hartl's Awesome New Rails Tutorial

RailsTutorial.org, a.k.a. the Ruby on Rails Tutorial, is an all new Ruby on Rails tutorial being developed by Michael Hartl (of RailsSpace and Insoshi fame). Drafts are currently live for chapters 1 through 4 and the tutorial aims to be a thorough and practical introduction to Rails. [Note: The book is now finished.] An associated screencast series is also set to follow… Currently the book is viewable online and the layout is splendid.

Peter Cooper, Rails Inside

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 awhile 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 gives 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

Woohoo! This is some fun coding with RoR…

I have done other books (including RailsSpace), and none make the intro to RoR so much fun as this one.

Given that I have read other RoR books, I did not expect to learn new stuff just going through the first couple of chapters. Just expected the same-ole 'Hello, world!' stuff. BUT NONE OF THAT WAS THERE… and I DID learn new stuff I did not know:

  • How to use Git properly
  • How to deploy Rails the easy way
  • Neat TDD tricks which make test-driven development fun
  • and so much more…

All within the first 3 chapters. I already feel like a better developer ;-). Now, I expect we are going to be getting started heavy with the sample app in Chapter 4 [and beyond].

I am excited!

Joshua C.

Very detailed and hands-on Rails tutorial!

Hi Michael, great job! I'm learning Rails, and I 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 with your good job! Thanks so much for sharing it.

—6yifeng

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

Awesome book—Thanks!

Spent the last 3 days nonstop doing http://railstutorial.org/ start-to-finish. Awesome book, @railstutorial—Thanks!

Derek Sivers (via Twitter)

A precious Gem

Amazing tutorial, thanks for all the time and effort you have put in to help us become better developers. I was mowing away without a sense of direction until I found this site, and haven't looked back since.

Keep up with your good job! Thanks so much for sharing it.

Gautham Ramesh

Rails Tutorial Rocks!

This by far the best tutorial on Ruby on Rails I've come across. I can't thank you enough for it. I've learned so much.

Sid Conklin

The best introduction to Rails I've ever seen

This is the best introduction to Rails I've ever seen. Rails is amazing, but with the fast-moving pace of the tools the community uses, I've always felt like it was some sort of exclusive club I couldn't get into. But after going through just the first chapter and having a Rails app up and running using Git, with a GitHub repo and deployed on Heroku, I don't feel left out anymore.

Keep up the amazing work!

Michael Erasmus

Impressive

Sometimes I feel the text is too long and I think it is all clear on the page, before I even read it. Sometimes I stumble a little and may even re-read a paragraph or two, figuring out what I missed. But in the end of the chapter I feel I grasped everything, can do the exercises easily, and know where to look for the answer.

I honestly think the book is tremendously effective in making Ruby on Rails even more popular and in making programming so much fun!

Adan Chenkov

Great Explanation of Version Control, Hosting and Testing

I've read a number of Rails books and this one (finally) made me understand it. What made it great was the inclusion, right off the bat, of Git, GitHub, Heroku, and RSpec. Version control, hosting and testing are usually topics kicked to the back of the book and BORING. You made it exciting—I cheered as my first Autospec test passed in the background after I made a change to the code. When I do move on to more customizable and scalable databases and hosting systems, I'll be ready. Also, Chapters 1–4 offer a great basic template for setting up almost any site.

Jake

Incredibly useful

Rails Tutorial is pitched at a great level for beginners. There's great explanations of concepts and how they apply to RoR.

mjdyson

Get both books now for only $39!

Discount code: