Home > Store

Ruby on Rails Tutorial, 6th Edition

Register your product to gain access to bonus material or receive a coupon.

Ruby on Rails Tutorial, 6th Edition

Best Value Purchase

Book + eBook Bundle

  • Your Price: $53.99
  • List Price: $89.98
  • Includes EPUB, MOBI, and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    MOBI MOBI The eBook format compatible with the Amazon Kindle and Amazon Kindle applications.

    Adobe Reader PDF The popular standard, used most often with the free Adobe® Reader® software.

    This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.

More Purchase Options

Book

  • Your Price: $39.99
  • List Price: $49.99
  • Usually ships in 24 hours.

eBook (Watermarked)

  • Your Price: $31.99
  • List Price: $39.99
  • Includes EPUB, MOBI, and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    MOBI MOBI The eBook format compatible with the Amazon Kindle and Amazon Kindle applications.

    Adobe Reader PDF The popular standard, used most often with the free Adobe® Reader® software.

    This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.

About

Features

  • A best-selling introduction to web development with Ruby on Rails by widely respected Rails expert Michael Hartl 
  • Suitable for beginning developers who want to learn web development and experienced web developers who want to learn Rails
  • Fully updated for Rails 6 
  • 16+ hour video companion to the book included

Description

  • Copyright 2021
  • Dimensions: 7" x 9-1/8"
  • Pages: 848
  • Edition: 6th
  • Book
  • ISBN-10: 0-13-670265-1
  • ISBN-13: 978-0-13-670265-8

Ruby on Rails Tutorial by Michael Hartl has become a must-read for developers learning how to build Rails apps.
Peter Cooper, Editor of Ruby Inside

Used by sites as varied as Disney, GitHub, Shopify, and Airbnb, Ruby on Rails is one of the most popular frameworks for developing web applications, but it can be challenging to learn and use. Whether youre new to web development or new only to Rails, Ruby on Rails Tutorial, Sixth Edition, is the solution.

Best-selling author and leading Rails developer Michael Hartl teaches Rails by guiding you through the development of three example applications of increasing sophistication. The tutorials examples focus on the general principles of web development needed for virtually any kind of website. The updates to this edition include full compatibility with Rails 6.

This indispensable guide provides integrated tutorials not only for Rails, but also for the essential Ruby, HTML, CSS, and SQL skills you need when developing web applications. Hartl explains how each new technique solves a real-world problem, and then he demonstrates it with bite-sized code thats simple enough to understand while still being 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, including a pre-installed integrated development environment (IDE) in the cloud
  • Go beyond generated code to truly understand how to build Rails applications from scratch
  • Learn testing and test-driven development (TDD)
  • 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
  • Create high-quality site layouts and data models
  • Implement registration and authentication systems, including validation and secure passwords
  • Update, display, and delete users
  • Upload images in production using a cloud storage service
  • Implement account activation and password reset, including sending email with Rails
  • Add social features and microblogging, including an introduction to Ajax
  • Record version changes with Git and create a secure remote repository at GitHub
  • Deploy your applications early and often with Heroku

Register your book for convenient access to downloads, updates, and/or corrections as they become available. See inside book for details.

Extras

Author's Site

Please visit the author's site at railstutorial.org.

Sample Content

Table of Contents

Foreword xvii
Acknowledgments xix
About the Author xxi

Chapter 1: From Zero to Deploy 1
1.1 Up and Running 4
1.2 The First Application 13
1.3 Version Control with Git 33
1.4 Deploying 49
1.5 Conclusion 55
1.6 Conventions Used in this Book 56

Chapter 2: A Toy App 59
2.1 Planning the Application 60
2.2 The Users Resource 65
2.3 The Microposts Resource 80
2.4 Conclusion 98

Chapter 3: Mostly Static Pages 101
3.1 Sample App Setup 101
3.2 Static Pages 108
3.3 Getting Started with Testing 118
3.4 Slightly Dynamic Pages 128
3.5 Conclusion 145
3.6 Advanced Testing Setup 146

Chapter 4: Rails-Flavored Ruby 153
4.1 Motivation 153
4.2 Strings and Methods 159
4.3 Other Data Structures 170
4.4 Ruby Classes 185
4.5 Conclusion 198

Chapter 5: Filling in the Layout 201
5.1 Adding Some Structure 201
5.2 Sass and the Asset Pipeline 225
5.3 Layout Links 235
5.4 User Signup: A First Step 248
5.5 Conclusion 253

Chapter 6: Modeling Users 255
6.1 User Model 256
6.2 User Validations 271
6.3 Adding a Secure Password 295
6.4 Conclusion 305

Chapter 7: Sign Up 309
7.1 Showing Users 310
7.2 Signup Form 331
7.3 Unsuccessful Signups 339
7.4 Successful Signups 355
7.5 Professional-Grade Deployment 367
7.6 Conclusion 373

Chapter 8: Basic Login 375
8.1 Sessions 376
8.2 Logging In 393
8.3 Logging Out 425
8.4 Conclusion 429

Chapter 9: Advanced Login 431
9.1 Remember Me 431
9.2 Remember Me Checkbox 456
9.3 Remember Tests 462
9.4 Conclusion 472

Chapter 10: Updating, Showing, and Deleting Users 475
10.1 Updating Users 475
10.2 Authorization 491
10.3 Showing All Users 507
10.4 Deleting Users 525
10.5 Conclusion 536

Chapter 11: Account Activation 539
11.1 Account Activations Resource 541
11.2 Account Activation Emails 549
11.3 Activating the Account 565
11.4 Email in Production 581
11.5 Conclusion 584

Chapter 12: Password Reset 587
12.1 Password Resets Resource 590
12.2 Password Reset Emails 599
12.3 Resetting the Password 607
12.4 Email in Production (Take Two) 621
12.5 Conclusion 624
12.6 Proof of Expiration Comparison 625

Chapter 13: User Microposts 627
13.1 A Micropost Model 627
13.2 Showing Microposts 643
13.3 Manipulating Microposts 657
13.4 Micropost Images 688
13.5 Conclusion 714

Chapter 14: Following Users 717
14.1 The Relationship Model 718
14.2 A Web Interface for Following Users 736
14.3 The Status Feed 768
14.4 Conclusion 780

Index 783

Updates

Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership