- Preface
- Acknowledgements
- About this book
- Who should read this book
- What’s new in the second edition
- Roadmap
- 1. Ruby on Rails, the framework
- 1.1. Ruby on Rails overview
- 1.2. Rails from first principles
- 1.3. Takeaways
- 1.4. Summary
- 2. Writing automated tests
- 2.1. Installing and setting up RSpec
- 2.2. Writing our first feature test
- 2.3. Writing a second scenario
- 2.4. Takeaway
- 2.5. Summary
- 3. Developing a real Rails application
- 3.1. First steps
- 3.2. Version control
- 3.3. Application configuration
- 3.4. Beginning your first feature
- 3.5. Takeaways
- 3.6. Summary
- 4. Oh, CRUD!
- 4.1. Viewing projects
- 4.2. Editing projects
- 4.3. Deleting projects
- 4.4. What happens when things can’t be found
- 4.5. Summary
- 5. Nested resources
- 5.1. Creating tickets
- 5.2. Viewing tickets
- 5.3. Editing tickets
- 5.4. Deleting tickets
- 5.5. Summary
- 6. Styling the application
- 6.1. Installing Bootstrap
- 6.2. Improving the page’s header
- 6.3. Semantic styling
- 6.4. Using Bootstrap Form
- 6.5. Adding a navigation bar
- 6.6. More responsive styling
- 7. Authentication
- 7.1. Using Devise
- 7.2. Adding sign up
- 7.3. Adding sign in and sign out
- 7.4. Linking tickets to users
- 7.5. Summary
- 8. Basic access control
- 8.1. Turning users into admins
- 8.2. Controller namespacing
- 8.3. Hiding links
- 8.4. Namespace-based CRUD
- 8.5. Summary
- 9. File uploading
- 9.1. Attaching a file
- 9.2. Attaching many files
- 9.3. Serving files through a controller
- 9.4. Using JavaScript
- 9.5. Responding to an asynchronous request
- 9.6. Summary
- 10. Tracking state
- 10.1. Leaving a comment
- 10.2. Changing a ticket’s state
- 10.3. Tracking changes
- 10.4. Managing states
- 10.5. Summary
- 11. Sending email
- 11.1. Sending ticket notifications
- 11.2. Testing with mailer specs
- 11.3. Subscribing to updates
- 11.4. Summary
- 12. Tagging
- 12.1. Creating tags
- 12.2. Editing tags
- 12.3. Deleting a tag
- 12.4. Finding tags
- 12.5. Summary
- 13. Deployment
- 13.1. What is deployment?
- 13.2. Simple deployment with Heroku
- 13.3. Twelve-factor apps
- 13.4. Deploying Ticketee
- 13.5. Continuous deployment with Travis CI
- 13.6. Sending emails
- 13.7. Summary
- Appendix A: Installation Guide
- Windows
- Mac OS X
- Linux
- Appendix B: Why Rails?
- Reason #1: The sense of community
- Reason #2: The speed and ease of development
- Reason #3: RubyGems
- Reason #4: Emphasis on Testing
Active Rails
Learn how to build a production-quality Rails 6 application from the ground up. Complete with TDD / BDD examples. Just like we do in the real world!
Minimum price
$25.00
$30.00
You pay
$30.00Authors earn
$24.00About
About the Book
This book will teach you the fundamentals of building a Rails application from the ground-up, complete with strict adherence to TDD and BDD.
Earlier editions of this book have been used by thousands of people to help their Ruby on Rails careers.
This book will show you how to build a fully-featured Rails 6 application that includes:
- CSS styles
- Authentication & Authorization
- File uploading
- Sending & receiving email
- Deployment
This book follows community-approved standards of developing a Rails application. We use RSpec and Capybara for testing, Bootstrap for styling, and Devise for authentication. There's also Active Storage for file loading, Action Mailer for sending email and Heroku for deployment.
Knowledge pre-requisites
This book assumes knowledge of HTML, CSS and some Ruby. No Rails knowledge is required for this book; we'll teach you what you need to know!
Author
About the Authors
Ryan has been writing books and documentation for programming languages for over a decade. These books have sold over 20,000 copies worldwide.
Ryan lives in the lovely coastal town of Warrnambool, Australia.

Episode 18
An Interview with Ryan Bigg
With over twenty years of experience building websites and web apps, and with a love of the written word, Rebecca has now found a way to combine the two.
Robin is a junior web developer with a plethora of life skills. Writing has been a passion since childhood. Creative writing has been her main focus with personal short stories, but is now able to bring that passion into the dev world as well.
Contents
Table of Contents
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Write and Publish on Leanpub
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.