Ruby on Rails Books

Ruby on Rails Tutorial: Learn Web Development with Rails, 3rd EditionMichael Hartl (2015) Ruby on Rails Tutorial, Third Edition, Addison Wesley

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 diverse as Twitter, GitHub, Disney, and the Yellow Pages, Ruby on Rails is one of the most popular frameworks for developing web applications, but it can be challenging to learn and use. Whether you’re new to web development or new only to Rails, Ruby on Rails Tutorial, Third 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, focusing on the fundamental techniques in web development needed for virtually any kind of application. The updates to this edition include simplified installation via a standard development environment in the cloud, use of the default Rails stack throughout, a light-weight testing approach, an all-new section on image upload, and an all-new chapter on account activation and password resets, including sending email with Rails.

This indispensable guide provides integrated tutorials not only for Rails, but also for the essential Ruby, HTML, CSS, and SQL skills you’ll 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 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, 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 Bitbucket
  • Deploy your applications early and often with Heroku

Table of Contents

Chapter 1: From Zero to Deploy

1.1 Introduction
1.2 Up and Running
1.3 Version Control with Git
1.4 Deploying
1.5 Conclusion

Chapter 2: A Demo App

2.1 Planning the Application
2.2 The Users Resource
2.3 The Microposts Resource
2.4 Conclusion

Chapter 3: Mostly Static Pages

3.1 Static Pages
3.2 Our First Tests
3.3 Slightly Dynamic Pages
3.4 Conclusion
3.5 Exercises
3.6 Advanced Setup

Chapter 4: Rails-Flavored Ruby

4.1 Motivation
4.2 Strings and Methods
4.3 Other Data Structures
4.4 Ruby Classes
4.5 Conclusion
4.6 Exercises

Chapter 5: Filling in the Layout

5.1 Adding Some Structure
5.2 Sass and the Asset Pipeline
5.3 Layout Links
5.4 User Signup: A First Step
5.5 Conclusion
5.6 Exercises

Chapter 6: Modeling Users

6.1 User Model
6.2 User Validations
6.3 Adding a Secure Password
6.4 Conclusion
6.5 Exercises

Chapter 7: Sign Up

7.1 Showing Users
7.2 Signup Form
7.3 Signup Failure
7.4 Signup Success
7.5 Conclusion
7.6 Exercises

Chapter 8: Sign In, Sign Out

8.1 Sessions and Signin Failure
8.2 Signin Success
8.3 Introduction to Cucumber (Optional)
8.4 Conclusion
8.5 Exercises

Chapter 9: Updating, Showing, and Deleting Users

9.1 Updating Users
9.2 Authorization
9.3 Showing All Users
9.4 Deleting Users
9.5 Conclusion
9.6 Exercises

Chapter 10: User Microposts

10.1 A Micropost Model
10.2 Showing Microposts
10.3 Manipulating Microposts
10.4 Conclusion
10.5 Exercises

Chapter 11: Following Users

11.1 The Relationship Model
11.2 A Web Interface for Following Users
11.3 The Status Feed
11.4 Conclusion
11.5 Exercises

Download Ruby on Rails 3 Tutorial – Learn Rails by Example (2011) (PDF 9,196KB)


Online: The Ruby on Rails Tutorial (Third Edition) – Learn Web Development with Rails by Michael Hartl
(https://www.railstutorial.org/book)
An intermediate level tutorial that is highly recommended throughout the Rails community. Extremely well written, technically sound, comprehensive and up-to-date.

The Ruby on Rails Tutorial book and screencast series teach you how to develop and deploy real, industrial-strength web applications with Ruby on Rails, the open-source web framework that powers top websites such as Twitter, Hulu, GitHub, and the Yellow Pages. The Ruby on Rails Tutorial book is available for free online and is available for purchase as an ebook (PDF, EPUB, and MOBI formats). The companion screencast series includes 12 individual lessons, one for each chapter of the Ruby on Rails Tutorial book. All purchases also include a free copy of the Solutions Manual for Exercises, with solutions to every exercise in the book.

Table of Contents


Lenz P. Simply Rails 2. The Ultimate Beginner's Guide to Ruby on Rails. Second EditionLenz, P. (2008) Simply Rails 2 – The Ultimate Beginner’s Guide to Ruby, Second Edition, SitePoint

Download eBook PDF (PDF 14,028KB)
Download Source Code (ZIP 542KB)

With Simply Rails 2 you’ll learn how to build bulletproof Web applications from scratch, with more features using less code.

Patrick’s updated the entire book to take advantage of all the new Rails 2 features. It’s the only beginner’s book we know that’s Rails 2 ready…

Inside the book you’ll learn how to:

– Build and deploy your own Rails web application.
– Reap the benefits of using best-practice MVC architecture.
– Use Rails’s Ajax features to create slick interfaces.
– Interact with databases easily using ActiveRecord.
– Add the magic of REST to your apps with Rails Resources.
– Use plugins to enhance your applications easily.

Simply Rails 2 will show you that there is a simple and easy way to build web 2.0 applications.

Simply Rails 2 is an easy-to-follow, practical and fun guide to Ruby on Rails for beginners. It covers all you need to get up and running, from installing Ruby, Rails and SQLite to building and deploying a fully featured web application.

Unlike other Rails books, this book doesn’t assume that you are an experienced web developer, or that you’ve used Ruby before. An entire chapter is devoted to learning Ruby in a fun way, using the interactive Ruby console, so you can follow along at home. You’ll be an accomplished Ruby programmer in no time!

This book focuses on the practical parts of Rails that you can use to build next-generation web applications, rather than the obscure features of Rails that no one uses.

The book uses Rails 2 — the (then) very latest version of Rails — so you can take advantage of all of the latest features of the framework.

Packed with easy-to-understand instructions and sample code, Simply Rails 2 is the ultimate beginner’s guide to Ruby on Rails.

Want to learn all about Ruby on Rails 2.0, the web application framework that is inspiring developers around the world?

The second edition of this practical, hands on book will:

  • show you how to install Ruby on Rails on Windows, Mac, or Linux
  • walk you, step by step, through the development of a Web 2.0 social news application, just like digg.com
  • show you how to test, debug, benchmark, and deploy your Rails application

Unlike other Rails books, this book doesn’t assume that you are an experienced web developer, or that you’ve used Ruby before. An entire chapter is devoted to learning Ruby in a fun way, using the interactive Ruby console, so you can follow along at home. You’ll be an accomplished Ruby programmer in no time!The example application that the book builds – a user-generated news web site – is built upon with each following chapter, and concepts such as sessions, cookies and basic AJAX usage are gradually introduced. Different aspects of Rails, such as user authentication, session cookies, and automated testing are explored with each feature that is added to the application.

The book finishes with chapters on debugging, benchmarking and deployment to a live web server.

By the end of the book, you’ll have built a fully-featured Web 2.0 application and deployed it to the Web. And all code is up-to-date for Rails 2.0, so you can begin coding immediately with the latest version of Rails.

What Will You Learn?

This book will teach you how to:

  • Program with confidence in the Ruby language.
  • Build and deploy a complete Rails web application.
  • Exploit the new features available in Rails 2.
  • Use Rails’ Ajax features to create slick interfaces.
  • Reap the benefits of a best-practice MVC architecture.
  • Work with databases easily using ActiveRecord.
  • Implement RESTful development patterns and clean URLs.
  • Create a user authentication system.
  • Use object oriented concepts like inheritance and polymorphism.
  • Build a comprehensive automated testing suite for your application.
  • Add plugins to easily enhance your application’s functionality.
  • Use migrations to manage your database schema without data loss.
  • Achieve maximum code reuse with filters and helper functions.
  • Debug your application using the ruby_debug client.
  • Analyze your application’s performance using the Rails logging infrastructure.
  • Benchmark your application to determine performance bottlenecks.
  • And a whole lot more

What you’ll learn

  • How to interact with your database using ActiveRecord and migrations instead of arcane SQL commands
  • Adding Ajax and visual effects to your application, using the built-in Prototype and script.aculo.us JavaScript libraries
  • Understand and use a model-view-controller architecture, maximizing code reuse and simplifying code maintenance.

Learn Ruby on Rails – A Tutorial by Daniel Kehoe (2013)
(http://learn-rails.com/learn-ruby-on-rails.html)

Get a solid start on Ruby on Rails web development with this book by renowned teacher and author Daniel Kehoe.

The book that is called “The best Rails book for beginners.”

Download Learn Ruby on Rails – A Tutorial by Daniel Kehoe (PDF 1,729KB)

For a solid start on Ruby on Rails web development…

Learn in a weekend

Build a real-life web application, using the newest Rails 4.2 version.

  • Install Rails
  • Mac, Linux, or Windows
  • Recommended gems
  • Front-end frameworks
  • Troubleshooting techniques
  • Where to get help
  • Rails challenges

Master the basics

No other tutorial does a better job of explaining basic concepts.

  • Ruby language literacy
  • Rails directory structure
  • Request-response cycle
  • Model-view-controller architecture
  • Static and dynamic pages
  • Forms processing
  • Testing

Work professionally

Learn the practices you’ll use in the workplace.

  • Ruby Version Management
  • Workflow with Git
  • Environment variables
  • Security practices
  • Product planning
  • Project management
  • Analytics

Prepare to go further

Learn Ruby on Rails is the best way to get the most from advanced tutorials and courses, preparing you for:

  • Capstone Rails Tutorials
  • Dev Bootcamp & other code camps
  • Michael Hartl’s Ruby on Rails Tutorial

Get this book by renowned teacher and author Daniel Kehoe. No other tutorial does a better job of explaining the concepts. Master the basics. Learn the practices you’ll use in the workplace as a professional Rails developer. Learn in a weekend, building a real-life web application, using the newest Rails version.

Is It For You?

This book is written for YOU if you are new to Ruby on Rails and…

  • You’ve got experience with the web and need to learn Rails
  • You don’t know how to program — but want to learn
  • You want to build an application
  • You want to start a career as a professional web developer

What Experts Are Saying

Linda Liukas, co-founder of Rails Girls…

Learn Ruby on Rails is a great book for anyone starting to learn web development, giving you the context and explanations at the right time in an encouraging way.”

Michael Hartl, author of the Ruby on Rails Tutorial

“If you’re new to web development, I recommend Daniel Kehoe’s excellent Learn Ruby on Rails book. Learn Ruby on Rails is the gentlest introduction to Rails that I know of, so it’s a great place for beginners to start.”

Chapters and Topics

  • Introduction – What You’ll Learn
  • Concepts – How the Web Works, What is Rails?, Gems, Git, Testing, Rails Stacks
  • Get Help When You Need It – Stack Overflow, Meetups, Pair Programming, Code Reviews
  • Plan Your Product – User Stories, Wireframes and Mockups, Behavior-Driven Development
  • Manage Your Project – Kanban, Trello, Agile
  • Accounts You May Need – GitHub, Gmail, MailChimp, Heroku
  • Get Started – Text Editor, Terminal, Unix commands, Installing Ruby
  • Create the Application – Starter Applications, Rails New, Server, Log Messages
  • The Parking Structure – Rails Files and Folders Explained
  • Time Travel with Git – Configuring Git, Repository, GitIgnore, Git Workflow, GitHub
  • Gems – Where Do Gems Live?, Gemfile, Bundler
  • Configure – Environment Variables, Config Secrets File, Configure Email
  • Static Pages and Routing – Public Folder, Home Page, About Page, Routes
  • Request and Response – Browser Developer Tools View, Document Object Model, Model View Controller
  • Dynamic Home Page – Naming Conventions, Routing, Model, View, Controller
  • Troubleshoot – Interactive Ruby Shell, Rails Console, Logger, Stack Trace, Exceptions
  • Just Enough Ruby – Ruby Literacy, Object-Oriented Terminology, Ruby Basics
  • Layout and Views – Template Languages, ERB, Application Layout, Boilerplate, Yield, View Helpers
  • Front-End Framework – Asset Pipeline, Navigation, Partials, Messages, Zurb Foundation
  • Add Pages – High Voltage Gem, Contact Page
  • Contact Form – SimpleForm, Params Hash, Validation, ActiveModel, RESTful Controllers, Security
  • Spreadsheet Connection – APIs, Connecting to Google Drive, Service-Oriented Architecture
  • Send Mail – Mailer, Queueing and Background Jobs
  • Mailing List – APIs
  • Deploy – Heroku
  • Analytics – Google Analytics, Segment, Turbolinks, Page and Event Tracking
  • Testing – Why Test?, What Are Tests?, Minitest, Capybara, Feature Tests, TDD
  • Rails Composer – Starter Applications
  • Rails Challenges – Overcoming Obstacles
  • Crossing the Chasm – Building Your Own Applications, Finding a Mentor, Self-Help Strategies
  • Level Up – What to Learn Next

Hawthorne, Andy (2015) JumpStart Rails, SitePoint

Download JumpStart Rails (PDF 4,266KB)

Download Code Archive (ZIP KB)

Get up to speed with Ruby on Rails 4 in a weekend.

n just a few short years, Ruby on Rails has grown from cool, hipster upstart to global powerhouse. Developers around the world are passionate about Rails, and with good reason.

BUILD FAST with 60,000+ ready-to-go Ruby gems, powerful, new functionality is a never more than a few keystrokes away.

DISCOVER Test-driven development for better programming practices.

SCALE APPS Look at GitHub, Twitter, Hulu, and Penny Arcade. All huge. All successful. All Rails.

GET HIRED Search any job board, there’s massive demand for Rails developers.

Those who have jumped onboard the Ruby on Rails train have never looked back and neither will you.

Learn Rails and you’ll write better code, faster, spend less time setting up and maintaining code and more time building.

Consider this book an investment in your career. There’s a huge and growing demand for developers with Rails skills, just look at any job board.

Learn Rails this weekend.

What will I learn?

Embrace good coding practice by learning the Rails way:

  • Convention over configuration
  • The Model–View–Controller (MVC) architecture
  • Test-driven development (TDD)
  • Don’t repeat yourself (DRY)

Make web development a much slicker process with Rails. It’s built on the Ruby programming language, which is a delight to work with too.

Who should read this book?

This book is for programmers new to Ruby and new to Rails.

Back-end developers experienced on other programming languages such as PHP will be able to get up to speed with Rails’ fundamentals in a weekend.

It is assumed that you know your way about the command line, and some programming fundamentals.


Shaw, Z. A. and Sobers, R. (2012) Learn Ruby the Hard Way – A Simple and Idiomatic Introduction to the Imaginative World of Computational Thinking with Code, Second Edition

The free HTML version of the book is available at http://learnrubythehardway.org/book/

The Third Edition is now available…..

Do you really want to learn programming but have no skill? Are you a system administrator who wants to learn Puppet or Chef? Are you a designer who wants to build your own websites? Are you a Ruby on Rails programmer who’s ashamed that you don’t really know Ruby? Then you should read this book. It assumes absolutely no prior programming knowledge and will guide you carefully and slowly through the learning process.

Learn Ruby The Hard Way is a retelling of the original “Learn Python The Hard Way” teaching Ruby, with all new simple yet idiomatic Ruby code written by Zed A. Shaw. “Learn Python The Hard Way” has taught hundreds of thousands worldwide how to code in Python, and this book uses the same proven method for Ruby. When you are done with this book you will have the skill to move on to other books about Ruby and be ready to understand them.

Download Learn Ruby the Hard Way (PDF 449KB)

Welcome to Learn Ruby the Hard Way, 3rd Edition. You can visit the companion site to the book at http://learnrubythehardway.org/ where you can purchase digital downloads and paper versions of the book. The free HTML version of the book is available at http://learnrubythehardway.org/book/

Table Of Contents


Cover image for Learn to ProgramPine, Chris (2009) Learn to Program (Facets of Ruby), Pragmatic Bookshelf

Computers are everywhere, on every desk, in your iPod, cell phone, and PDA. To live well in the 21st century, you need to know how to make computers do things. And to really make computers do what you want, you have to learn to program.
Fortunately, that’s easier now than ever before. Chris Pine’s book will teach you how to program. You’ll learn to use your computer better, to get it to do what you want it to do. Starting with small, simple one-line programs to calculate your age in seconds, you’ll see how to advance to fully structured, real programs. You’ll learn the same technology used to drive modern dynamic websites and large, professional applications.
It’s now easier to learn to write your own computer software than it has ever been before. Now everyone can learn to write programs for themselves—-no previous experience is necessary. Chris takes a thorough, but light-hearted approach that teaches you how to program with a minimum of fuss or bother.
For this new edition of the best-selling Learn to Program, Chris Pine has taken a good thing and made it even better. First, he used the feedback from hundreds of reader e-mails to update the content and make it even clearer. Second, he updated the examples in the book to use the latest stable version of Ruby, and also to use code that looks more like real-world Ruby code, so that people who have just learned to program will be more familiar with common Ruby techniques.
Not only does the Second Edition now include answers to all of the exercises, it includes them twice. First you’ll find the “how you could do it” answers, using the techniques you’ve learned up to that point in the book. Next you’ll see “how Chris Pine would do it”: answers using more advanced Ruby techniques, to whet your appetite as well as providing sort of a “Rosetta Stone” for more elegant solutions.


Cooper, Peter (2009) Beginning Ruby: From Novice to Professional (Expert’s Voice in Open Source), Second Edition, Apress

Based on the bestselling first edition, Beginning Ruby: From Novice to Professional, Second Edition is the leading guide for every type of reader who wants to learn Ruby from the ground up.

The new edition of this book provides the same excellent introduction to Ruby as the first edition plus updates for the newest version of Ruby, including the addition of the Sinatra and Ramaze web application frameworks and a chapter on GUI development so developers can take advantage of these new trends.

Beginning Ruby starts by explaining the principles behind object-oriented programming and within a few chapters builds toward creating a full Ruby application. By the end of the book, in addition to in-depth knowledge of Ruby, you’ll also have basic understanding of many ancillary technologies such as SQL, XML, web frameworks, and networking.

  • Introduces readers to the Ruby programming language
  • Takes readers from basic programming skills to web development with topics like Ruby-based frameworks and GUI programming
  • Covers many ancillary technologies in order to provide a broader picture (e.g., databases, XML, network daemons)

What you’ll learn

  • Understand the basics of Ruby and object-oriented building blocks.
  • Work with Ruby libraries, gems, and documentation.
  • Work with files and databases.
  • Write and deploy Ruby applications.
  • Explore Ruby web frameworks and aspects of network programming with Ruby.
  • Develop desktop and GUI applications with Ruby.

Who this book is for

Beginning programmers, programmers new to Ruby, and web developers interested in knowing the foundations of the language.

Table of Contents

  1. Let’s Get It Started: Installing Ruby
  2. Programming = Joy: A Whistle-Stop Tour of Ruby and Object Orientation
  3. Ruby’s Building Blocks: Data, Expressions, and Flow Control
  4. Developing Your First Ruby Application
  5. The Ruby Ecosystem
  6. Classes, Objects, and Modules
  7. Projects and Libraries
  8. Documentation, Error Handling, Debugging, and Testing
  9. Files and Databases
  10. Deploying Ruby Applications and Libraries
  11. Advanced Ruby Features
  12. Tying It Together: Developing a Larger Ruby Application
  13. Web Application Frameworks: Rails, Sinatra, and Ramaze
  14. Ruby and the Internet
  15. Networking, Sockets, and Daemons
  16. GUI-Based Desktop Application Development
  17. Useful Ruby Libraries and Gems

Collingbourne, Huw (2008) The Little Book of Ruby, Second Edition, Dark Neon Ltd.
(http://www.sapphiresteel.com/ruby-programming/The-Little-Book-Of-Ruby.html)
Your FREE guide to Programming Ruby from SapphireSteel software (http://www.sapphiresteel.com)

The fastest, easiest way to learn Ruby ‘by example.

The Little Book Of Ruby is a PDF eBook which will guide you through the fundamentals of Ruby programming. Starting with the basics (strings, numbers, objects and methods) it quickly moves on to explain all you need to know to create your own class hierarchies, use arrays, hashes, iterators, modules, mixins and much more besides…

Download The Little Book of Ruby (PDF 1,145KB)
OR direct from

Download  source code archive (ZIP 25KB)
OR direct from
http://www.sapphiresteel.com/ruby-programming/The-Little-Book-Of-Ruby.html

You can load these source files into any Ruby editor or IDE.


Bigg, R.,  Katz, Y., Steve Klabnik, S., and Skinner, R. (2015) Rails 4 in Action -Revised Edition of Rails 3 in Action, Second Edition, Manning Publications
Rails 4 in Action is a comprehensive introduction to Rails that guides you hands-on through all you’ll need to become a competent and confident Rails developer. In it, you’ll master Rails 4 by developing a ticket-tracking application that includes RESTful routing, authentication and authorization, file uploads, email, and more.
Download Chapter 1 (PDF 2,039KB)
Download Chapter 2 (PDF 1,624KB)
Download Chapter 3 (PDF 1,711KB)
Download Code Archive (ZIP 179KB)
Download Rails 4 in Action (MEAP Edition) (PDF 6,792KB) (Manning Early Access Program)

About the Book
Rails 4 in Action is a hands-on guide to the subject. In this fully revised new edition, you’ll master Rails 4 by developing a ticket-tracking application that includes RESTful routing, authentication and authorization, file uploads, email, and more. Learn to design your own APIs and successfully deploy a production-quality application. You’ll see test-driven development and behavior-driven development in action throughout the book, just like in a top Rails shop.

Ruby on Rails is an open source web framework. It’s famously simple to build a basic Rails application. Once you’ve started down the track, however, you discover that Rails is a powerful, deep, and rich full-stack platform capable of tackling virtually any development challenge.

Rails 4 in Action is a fully-revised second edition of Rails 3 in Action. This hands-on, comprehensive introduction to Rails gives readers everything they need to become competent and confident Rails developers. It shows how to develop a ticket tracking application that includes RESTful routing, authentication and authorization, file uploads, email, and more. It explores powerful features like designing APIs and building a Rails engine. The book also provides Test Driven Development and Behavior Driven Development in action throughout the book—just like in a top Rails shop.

Rails is a full-stack, open source web framework powered by Ruby. Now in version 4, Rails is mature and powerful, and to use it effectively you need more than a few Google searches. You’ll find no substitute for the guru’s-eye-view of design, testing, deployment, and other real-world concerns that this book provides.

What’s Inside

  • Creating your own APIs
  • Using RSpec and Capybara
  • Emphasis on test-first development
  • Fully updated for Rails 4

About the reader
For readers of this book, a background in Ruby is helpful but not required. No Rails experience is assumed.

Table of Contents

  1. Ruby on Rails, the framework
  2. Testing saves your bacon
  3. Developing a real Rails application
  4. Oh, CRUD!
  5. Nested resources
  6. Authentication
  7. Basic access control
  8. Fine-grained access control
  9. File uploading
  10. Tracking state
  11. Tagging
  12. Sending email
  13. Deployment
  14. Designing an API
  15. Rack-based applications
1. Ruby on Rails, the framework
1.1. Ruby on Rails overview
1.1.1. Benefits
1.1.2. Ruby gems
1.1.3. Common terms
1.1.4. Rails in the wild
1.2. Developing your first application
1.2.1. Installing Rails
1.2.2. Generating an application
1.2.3. Starting the application
1.2.4. Scaffolding
1.2.5. Migrations
1.2.6. Viewing and creating purchases
1.2.7. Validations
1.2.8. Routing
1.2.9. Updating
1.2.10. Deleting
1.3. Summar
2. Testing saves your bacon
2.1. Using TDD and BDD to save your bacon
2.2. Test-driven development basics
2.2.1. Writing your first test
2.2.2. Saving bacon
2.3. Behavior-driven development basics
2.3.1. Introducing RSpec
2.3.2. Writing your first spec
2.3.3. Running the spec
2.3.4. Much more bacon
2.3.5. Expiring bacon
2.4. Summary
3. Developing a real Rails application
3.1. First steps
3.1.1. The application story
3.1.2. Laying the foundations
3.2. Version control
3.2.1. Getting started with GitHub
3.2.2. Configuring your Git client
3.3. Application configuration
3.3.1. The Gemfile and generators
3.3.2. Database configurations
3.4. Beginning your first feature
3.4.1. Creating projects
3.4.2. Defining a controller action
3.4.3. RESTful routing
3.4.4. Committing changes
3.4.5. Setting a page title
3.4.6. Validations
3.5. Summary
4. Oh CRUD!
4.1. Viewing projects
4.1.1. Introducing Factory Girl
4.1.2. Adding a link to a project
4.2. Editing projects
4.2.1. The edit action
4.2.2. The update action
4.3. Deleting projects
4.4. What happens when things can’t be found
4.4.1. Visualizing the error
4.4.2. Handling the ActiveRecord::RecordNotFound exception
4.5. Styling the application
4.5.1. Installing Bootstrap
4.5.2. Improving the page’s header
4.5.3. Improving the show view
4.5.4. Semantic styling
4.5.5. Using Simple Form
4.5.6. Adding a navigation bar
4.5.7. Responsive styling
4.6. Summary
5. Nested resources
5.1. Creating tickets
5.1.1. Nested routing helpers
5.1.2. Creating a tickets controller
5.1.3. Demystifying the new action
5.1.4. Defining a has_many association
5.1.5. Creating tickets in a project
5.1.6. Finding tickets scoped by project
5.1.7. Ticket validations
5.2. Viewing tickets
5.2.1. Listing tickets
5.2.2. Culling tickets
5.3. Editing tickets
5.3.1. The ticket-editing spec
5.3.2. Adding the edit action
5.3.3. Adding the update action
5.4. Deleting tickets
5.5. Summary
6. Authentication
6.1. Using Devise
6.2. Adding sign-up
6.3. Adding sign-in and sign-out
6.3.1. Adding sign-in
6.3.2. Adding sign-out
6.3.3. Styling the Devise views
6.4. Linking tickets to users
6.4.1. Fixing the failing four features
6.5. Summary
7. Basic access control
7.1. Turning users into admins
7.1.1. Adding the admin field to the users table
7.1.2. Creating the first admin user
7.2. Controllern namespacing
7.2.1. Generating a namespaced controller
7.2.2. Testing a namespaced controller
7.2.3. Moving functionality into the admin namespace
7.3. Hiding links
7.3.1. Hiding the “New Project” link
7.3.2. Hiding the delete link
7.4. Namespace-based CRUD
7.4.1. The index action
7.4.2. The new action
7.4.3. The create action
7.4.4. Creating admin users
7.4.5. Editing users
7.4.6. The edit and update actions
7.4.7. Archiving users
7.4.8. Ensuring that you can’t archive yourself
7.4.9. Preventing archived users from signing in
7.5. Summary
8. Fine-grained access control
8.1. Project-viewing permission
8.1.1. Assigning Roles in specs
8.1.2. Creating the Role model
8.1.3. Setting up Pundit
8.1.4. Testing the ProjectPolicy
8.1.5. Fixing what you broke
8.1.6. Handling authorization errors
8.1.7. One more thing
8.2. Project-updating permission
8.2.1. Testing the ProjectPolicy again
8.2.2. Applying the authorization
8.2.3. Hiding the “Edit Project” link
8.3. Ticket-viewing permission
8.3.1. Refactoring policy specs
8.3.2. Testing the TicketPolicy
8.3.3. Refactoring policies
8.4. Ticket-creation permission
8.4.1. Testing the TicketPolicy … again
8.4.2. Applying the authorization
8.5. Ticket-updating permission
8.5.1. Testing the TicketPolicy … turbocharged
8.5.2. Implementing controller authorization
8.6. Ensuring authorization for all actions
8.7. Assigning roles to users
8.7.1. Planning the permission screen with a feature spec
8.7.2. The roles screen
8.7.3. Building a list of projects in a select box
8.7.4. Processing the submitted role data
8.7.5. Saving roles of new users
8.8. Summary
9. File uploading
9.1. Attaching a file
9.1.1. A feature featuring files
9.1.2. Enter, stage right: CarrierWave
9.1.3. Using CarrierWave
9.1.4. Persisting uploads when redisplaying a form
9.2. Attaching many files
9.2.1. Testing multiple-file upload
9.2.2. Implementing multiple-file upload
9.2.3. Using nested attributes
9.3. Serving files through a controller
9.3.1. Testing existing functionality
9.3.2. Protecting attachments
9.3.3. Showing your attachments
9.3.4. Public attachments
9.3.5. Privatizing attachments
9.4. Using JavaScript
9.4.1. JavaScript testing
9.4.2. Cleaning the database
9.4.3. Introducing jQuery
9.4.4. Adding more files with JavaScript
9.5. Responding to an asynchronous request
9.5.1. Appending new content to the form
9.5.2. Sending parameters for an asynchronous request
9.6. Summary
10. Tracking state
10.1. Leaving a comment
10.1.1. The comment form
10.1.2. The comments controller
10.2. Changing a ticket’s state
10.2.1. Creating the State model
10.2.2. Selecting states
10.2.3. Setting a default state for a comment
10.2.4. Seeding your app with states
10.3. Tracking changes
10.3.1. Ch-ch-changes
10.3.2. Another c-c-callback
10.3.3. Displaying changes
10.3.4. Styling states
10.4. Managing states
10.4.1. Adding additional states
10.4.2. Defining a default state
10.4.3. Applying the default state
10.4.4. Setting a default state in seed states
10.5. Locking down states
10.5.1. Hiding a select box
10.5.2. Defining the change_state permission
10.5.3. Hacking a form
10.5.4. Ignoring a parameter
10.6. Summary
11. Tagging
11.1. Creating tags
11.1.1. The tag-creation feature
11.1.2. Showing tags
11.1.3. Defining the tags association
11.1.4. The Tag model
11.1.5. Displaying a ticket’s tags
11.2. Adding more tags
11.2.1. Adding tags through a comment
11.3. Tag restriction
11.3.1. Testing tag restriction
11.3.2. Tags are allowed, for some
11.4. Deleting a tag
11.4.1. Testing tag deletion
11.4.2. Adding a link to delete the tag
11.4.3. Removing a tag from the page
11.5. Finding tags
11.5.1. Testing search
11.5.2. Searching by tags
11.5.3. Searching by state
11.5.4. Search, but without the search
11.6. Summary12. Sending email
12.1. Sending ticket notifications
12.1.1. Automatically watching a ticket
12.1.2. Using service classes
12.1.3. Defining the watchers association
2.1.4. Introducing Action Mailer
12.1.5. An Action Mailer template
12.1.6. Testing with mailer specs
12.2. Subscribing to updates
12.2.1. Testing comment subscription
12.2.2. Automatically adding the commenter to the watchers list
12.2.3. Unsubscribing from ticket notifications
12.3. Summary   
13. Deployment
13.1. What is deployment?
13.2. Simple deployment from Heroku
13.2.1. Signing up
13.2.2. Provisioning an app
13.3. Twelve-factor apps
13.3.1. Configuration
13.3.2. Processes
13.3.3. Combining Heroku and S3
13.4. Deploying Ticketee
13.4.1. Fixing deployment issues
13.4.2. Fixing CarrierWave file uploads
13.4.3. Deploying is hard
13.5. Continuous deployment with Travis CI
13.5.1. Configuring Travis
13.5.2. Deployment
13.6. Sending emails
13.7. Summary
14. Designing an API
14.1. An overview of APIs
14.1.1. A practical examples
14.2. Using ActiveModel::Serializers
14.2.1. Getting your hands dirty
14.3. API authentication and authorization
14.3.1. The API namespace
14.3.2. A small tangent on inflections
14.3.3. Getting back to your API
14.4. It’s not a party without … HTTParty
14.5. Handling errors
14.5.1. Authenticating with a blank token
14.5.2. Permission denied
14.5.3. Validation errors
14.6. A small refactoring
14.7. Summary
15. Rack-based applications
15.1. Building Rack applications
15.1.1. A basic Rack application
15.1.2. Let’s increase the heartbeat
15.1.3. You’re not done yet
5.2. Building bigger Rack applications
15.2.1. You’re breaking up
15.2.2. Running a combined Rack application
15.3. Mounting a Rack application with Rails
15.3.1. Mounting Heartbeat
15.3.2. Introducing Sinatra
15.3.3. The API, by Sinatra
15.3.4. Basic error-checking
15.4. Middleware
15.4.1. Middleware in Rails
15.4.2. Crafting middleware
15.4.3. Using middleware
15.5. Summary
Appendixes
Appendix A: Installation guide
A.1. Windows
A.2. Mac OS X
A.3. Linux
Appendix B: Why Rails?