Ruby on Rails Tutorial (Rails 5) Learn Web Development with Rails Michael Hartl

NOTE: There is a newer version of the Ruby on Rails Tutorial available here


Joining the email list for this book will allow the author to contact you to let you know about special offers and when updates for the book are available.

Pricing Options

  • $39.00
    HTML and Ebook
    • The Rails 5 version (4th edition) of the Ruby on Rails Tutorial ebook in EPUB, MOBI, and PDF formats
    • Over 700 pages of content
    • Fully updated for the latest version of Rails
    • Free access to solutions
  • $149.00
    HTML and Screencast Videos
    • The full Ruby on Rails Tutorial 4th edition screencast series (Rails 5 edition)
    • 14 screencast lessons (one for each chapter), with more than 15 hours of downloadable HD video (view a free sample lesson)
    • Fully updated for the latest version of Rails
    • Free access to solutions
  • $169.00
    HTML, Ebooks, and Screencast videos
    • The full Ruby on Rails Tutorial 4th edition screencast series (Rails 5 edition)
    • 14 screencast lessons (one for each chapter), with more than 15 hours of downloadable HD video (view a free sample lesson)
    • Downloadable ebooks (PDF, EPUB, MOBI) of the Ruby on Rails Tutorial 4th edition (Rails 5)
    • Fully updated for the latest version of Rails
    • Free access to solutions

About the Author

Michael Hartl

Michael Hartl is the creator of the Ruby on Rails Tutorial, one of the leading introductions to web development, and is a cofounder of Learn Enough to Be Dangerous self-publishing platform. 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.


  • just wanted to say thank you

    by Gravatar @roberthopman on December 10, 2017 at 12:50

    Well, just wanted to say thank you. Best tutorial as far as I know on RoR. See you on twitter.
  • This book allowed me to land my first job

    by Gravatar Mauricio Guzmán on November 28, 2017 at 11:48

    Amazing book, it explains the concepts clearly and illustrates them with powerful examples, I have taken rails tutorials before, but this book gave me the basis to fully understand and be able to code in rails effortlessly.
  • I love it.

    by Gravatar James M on February 26, 2017 at 14:17

    I love it. I now have rails fundamentals down.


  • Dhh
    David Heinemeier Hansson - Founder & CTO, Basecamp; Creator, Ruby on Rails

    [New] edition of @mhartl’s much celebrated The Ruby on Rails Tutorial is out in draft: — looks like a great upgrade!


  • Jimmywales
    Jimmy Wales - Founder, Wikipedia

    Q: What is Jimmy Wales’s favorite book?

    A: It changes often. At the moment, it’s Ruby on Rails Tutorial by Michael Hartl. :)


  • Dereksiverssmall
    Derek Sivers - Entrepreneur, programmer

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

  • Petercooper
    Peter Cooper - Ruby Inside

    I got review access to all of the material and can confirm that, yes, these screencasts are awesome… If you basically want to be able to look “over the shoulder” of an experienced Rails developer and see how a Rails development environment is set up and how multiple apps are built, there’s nothing that can beat this. This isn’t a set of “build a blog in 15 minutes” videos—it’s a complete course that could kick off a new career for you with Rails.

  • Alanmccann
    Alan McCann - COO,

    Michael’s original Ruby on Rails tutorial got me from someone who read Rails books to someone who actually was able to develop basic Rails apps—his teaching methodology somehow got me involved like no other book and allowed me to produce results quickly and gain confidence. The new screencast series got me to a whole other level of understanding.

    Imagine going through the tutorial but having the pro-level developer behind the tutorial giving you a running commentary with tips, tricks, and useful detours—all while contributing to your growth as a Rails developer with a test-driven approach. I’ve always known that understanding how experts think about what they do is the key to learning and mastering something. In this screencast format, Michael was able to go beyond the limitations of the written word and both show and explain his approach to Rails development in an engaging manner.

    If you are early in your days with Rails, just buy this series.

  • Mikeriley
    Mike Riley - Dr. Dobbs

    Written and presented by theoretical physicist Michael Hartl, Ruby on Rails Tutorial offers a superb introduction to the world of a Rails developer. The Rails Tutorial PDF and complete training video set is an absolutely top-notch package for learning the Rails framework…”

    I can’t emphasize enough how much I enjoyed the Ruby on Rails Tutorial book+video bundle. will no doubt educate legions of beginning and intermediate Rails developers, and will be one of those resources that students who complete the book and video course will refer to often. Because Michael offers the full contents of the book available for free on the website, both the book and videos are sure to become some of the most frequently cited educational references among Rails students. This package will no doubt play a major catalytic role in many Rails technical training and development careers.

    If you have any interest in Rails, you owe it to yourself and your educational investment to obtain this superb package. It will likely be one of the best and most educationally rewarding purchases you will make this year.

  • Mikelong
    Mike Long - Software Engineer

    Just finished the outstanding @railstutorial. Probably the best software tutorial I’ve experienced since K&R [The C Programming Language by Kernighan & Ritchie].


  • Danielauger
    Daniel Auger - Systems Architect for Minnesota Secretary of State

    For what it’s worth: I had fantastic customer service from @railstutorial today. Buy with confidence my friends.



  • What are Ruby and Ruby on Rails?

    Ruby is a general-purpose programming language, and Ruby on Rails (or “Rails” for short) is a framework for making web applications written in Ruby.

  • Why should I learn Ruby on Rails?

    Ruby on Rails is one of the most powerful and popular web development frameworks available, used by sites like Twitter, GitHub, Airbnb, and Hulu. Learning Rails will give you the tools you need to make your own web applications, while also putting you in a good position to work for a web development consultancy, startup, or other tech company.

  • What is the Ruby on Rails Tutorial?

    The Ruby on Rails Tutorial: Learn Web Development with Rails is the 4th edition of a book and a screencast series designed to teach web development with the Ruby on Rails web framework.

  • Who should study the Ruby on Rails Tutorial?

    The Ruby on Rails Tutorial is designed for anyone who wants to learn how to develop web applications. This audience includes entrepreneurs, small business owners, aspiring developers, and experienced developers with experience in other languages or frameworks.

  • Is the Ruby on Rails Tutorial appropriate for complete beginners?

    The Ruby on Rails Tutorial is likely to be very challenging if you have no programming experience at all, but many beginners have reported that they were able to get through it with enough determination (in some cases, by going through the entire tutorial twice!).

  • What are the prerequisites for the Ruby on Rails Tutorial?

    There are no formal prerequisites, but I recommend familiarity with HTML and CSS, and some previous programming experience is helpful.

  • Does the Rails Tutorial use the latest version of Rails?

    Yes, The Ruby on Rails Tutorial: Learn Web Development with Rails is fully up-to-date with the latest version of Rails.

  • What does the Ruby on Rails Tutorial cover?

    Here are the chapter titles for the 4th edition of the Ruby on Rails Tutorial:

    1. From zero to deploy
    2. A toy app
    3. Mostly static pages
    4. Rails-flavored ruby
    5. Filling in the layout
    6. Modeling users
    7. Sign up
    8. Basic login
    9. Advanced login
    10. Updating, showing, and deleting users
    11. Account activation
    12. Password reset
    13. User microposts
    14. Following users

    See the full table of contents for more details.

  • The screencast series includes all the content from the book, while adding dozens of tips and tricks to help you go beyond the text, including debugging hints, testing techniques, and more detailed explanations of some of the finer points of web development. And though the screencasts are carefully edited, I’ve left in some of the problems I encountered along the way, so that you can learn how to recover from the inevitable application errors—and see that even experts sometimes make mistakes.

  • Why did my download include only the first three chapters?

    That’s the sample book available even to non-logged-in users. If you log into your account, you’ll be able to download the full text.

  • What about single-page web frameworks like Angular, Backbone, and Ember?

    While some applications benefit from a JavaScript-heavy front-end, most applications are still more naturally structured as a collection of documents, and Rails is a better fit for this more common case. In addition, JavaScript frameworks like Angular and Ember still need a back-end to process requests, talk to the database, etc.—a job at which Rails excels. (Indeed, two of the core Ember developers are also current and former members of the Rails core team.)

  • Do I have to buy a subscription to the Cloud9 IDE to complete the Rails Tutorial?

    No, Cloud9 has a free tier that is perfect for doing the tutorial without committing to a monthly fee.

  • Where can I find the latest updates about the Ruby on Rails Tutorial?

    The best thing to do is to join the email list. Announcements are also typically available online via the Rails Tutorial News feed.

  • If I buy the Rails Tutorial, will I get updates for free?

    Minor updates are free, while new editions are paid upgrades with substantial upgrade discounts for current customers.

  • Is there a print edition of the Rails Tutorial?

    The print edition’s Amazon page is here.

  • Is the print edition the same as the online version and ebook?

    Yes. Apart from minor corrections, the print edition has the same content as the online version and the ebook edition.

  • Are the previous versions of the Rails Tutorial still available online?

    Yes, previous versions are available at the following links:

  • Should I report a tiny typo I found?

    Typo reports, no matter how small, are gratefully received. My only request is that you check the online version first to make sure the typo hasn’t already been corrected. Please send reports via email to the address below.

  • How do I contact the author?

    You can reach me by email at admin at railstutorial dot org.

  • Do you offer a money-back guarantee?

    Yes, every Rails Tutorial purchase comes with a 60-day money-back guarantee.


The 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-micropost associations, social “following”, and a feed of status updates. The Ruby on Rails Tutorial also teaches good software development practices, including version control with Git and GitHub, test-driven development (TDD) and integration testing, and instant deployment with Heroku. Though of necessity the book and screencasts focus on a specific sample application, the emphasis throughout the Rails Tutorial is on general principles, so you will have a solid foundation no matter what kind of web application you want to build.

New in the current edition

  • Fully updated for the latest version of Rails
  • Use of a free integrated development environment in the cloud for maximum cross-platform compatibility
  • 100% default stack use of the Rails framework for greatest ease of use
  • Lightweight, intuitive approach to testing
  • Completely rewritten chapter on login and authentication
  • All-new section on image upload
  • All-new chapter on account activation and password resets, including sending email with Rails
  • Strong focus on universal principles of web development


Translations of the Ruby on Rails Tutorial are available in several languages:

Fourth edition

Third edition


Web development is a tricky business, and despite the best efforts of the tutorial it’s likely that you’ll run into trouble at some point. If you do, I suggest comparing your code to the reference implementation of the sample app to track down any discrepancies. You can also post your question at Stack Overflow using the tag (Click here to see questions labeled with that tag.) The creators of the Learn_Rails subreddit have graciously offered to answer questions as well.

Errors in the tutorial can be reported by email, but please triple-check by comparing with the reference implementation of the sample app first.

Debugging tips

While it’s impossible to anticipate every potential problem, here are some debugging tips that might help:

  • Have you compared your code to the reference implementation of the sample app?
  • Are you using the exact gem versions (including Rails) used in the tutorial?
  • Did you restart the web server?
  • Did you try stopping Spring using bin/spring stop?
  • Did you kill all relevant Spring processes (as described in the book)?
  • Did you copy-and-paste from the book’s code? (Experience shows that typing in code, while a better learning technique in general, is error-prone, so when in doubt be sure to copy all code exactly.)
  • Did you re-run bundle install?
  • Did you try running bundle update?
  • Did you examine the Heroku logs using heroku logs?
  • Did you try Googling the error message?

If your problem is of a general nature, such as having issues installing Rails or configuring your system, I suggest posting to Stack Overflow (again using the tag, sending a message to the Ruby on Rails Talk mailing list, or posting to the Learn_Rails subreddit. This will allow other people running into your issue (and not just those following the Rails Tutorial) to benefit from the discussion. You can also try asking your question on the Rails IRC channel (#rubyonrails) to get live assistance from other Rails programmers. For issues deploying to Heroku, please contact Heroku technical support.

When asking your question on any mailing list or forum, be sure to include as much relevant information as possible. To maximize your chances of a helpful reply, I especially recommend the article How To Ask Questions The Smart Way by Eric Raymond.


I can be reached by email at admin at railstutorial dot org.

Affiliate notification

Michael Hartl is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to