Agile Web Development with Rails 5.1

Sam Ruby, David B. Copeland, Dave Thomas



Learn Rails the way the Rails core team recommends it, along with the tens of thousands of developers who have used this broad, far-reaching tutorial and reference. If you're new to Rails, you'll get step-by-step guidance. If you're an experienced developer, get the comprehensive, insider information you need for the latest version of Ruby on Rails. The new edition of this award-winning classic is completely updated for Rails 5.1 and Ruby 2.4, with information on system testing, Webpack, and advanced JavaScript.

Ruby on Rails helps you produce high-quality, beautiful-looking web applications quickly---you concentrate on creating the application, and Rails takes care of the details. Rails 5.1 brings many improvements, and this edition is updated to cover the new features and changes in best practices.

We start with a step-by-step walkthrough of building a real application, and in-depth chapters look at the built-in Rails features. Follow along with an extended tutorial as you write a web-based store application. Eliminate tedious configuration and housekeeping; seamlessly incorporate Ajax and JavaScript; send emails and manage background jobs with ActiveJob; build real-time features using WebSockets and ActionCable. Test your applications as you write them using the built-in unit, integration, and system testing frameworks; internationalize your applications; and deploy your applications easily and securely. New in this edition is support for Webpack and advanced JavaScript, as well as Rails' new browser-based system testing.

Rails 1.0 was released in December 2005. This book was there from the start, and didn't just evolve alongside Rails, it evolved with Rails. It has been developed in consultation with the Rails core team. In fact, Rails itself is tested against the code in this book.

What You Need:

All you need is a Windows, Mac OS X, or Linux machine to do development on. This book will take you through the steps to install Rails and its dependencies. If you aren't familiar with the Ruby programming language, this book contains a chapter that covers the basics necessary to understand the material in the book.


學習Rails的方式是Rails核心團隊和數以萬計的開發人員推薦的方式,他們使用了這個廣泛而深入的教程和參考資料。如果你是Rails的新手,你將獲得逐步指導。如果你是一位有經驗的開發人員,你將獲得最新版本Ruby on Rails的全面內部資訊。這本屢獲殊榮的經典著作的新版本完全更新為Rails 5.1和Ruby 2.4,並提供有關系統測試、Webpack和高級JavaScript的資訊。

Ruby on Rails可以幫助你快速製作高質量、外觀漂亮的網絡應用程序,你只需專注於創建應用程序,Rails會處理細節。Rails 5.1帶來了許多改進,這本書的更新版涵蓋了新功能和最佳實踐的變化。


Rails 1.0於2005年12月發布。這本書從一開始就存在,並且不僅僅是與Rails一起演進,它也與Rails一起演進。它是在與Rails核心團隊的諮詢下開發的。事實上,Rails本身是根據這本書中的代碼進行測試的。

你所需要的只是一台Windows、Mac OS X或Linux機器進行開發。本書將帶你進行安裝Rails及其相依項目的步驟。如果你對Ruby編程語言不熟悉,本書包含了一章介紹基礎知識,以便理解書中的內容。