Deliver to your Kindle or other device


Try it free

Sample the beginning of this book for free

Deliver to your Kindle or other device

Sorry, this item is not available in
Image not available for
Image not available


The Rails 4 Way (3rd Edition) (Addison-Wesley Professional Ruby Series) [Kindle Edition]

Obie Fernandez , Kevin Faustino

Print List Price: £30.99
Kindle Price: £16.25 includes VAT* & free wireless delivery via Amazon Whispernet
You Save: £14.74 (48%)
* Unlike print books, digital books are subject to VAT.

Free Kindle Reading App Anybody can read Kindle books—even without a Kindle device—with the FREE Kindle app for smartphones, tablets and computers.

To get the free app, enter your e-mail address or mobile phone number.


Amazon Price New from Used from
Kindle Edition £16.25  
Paperback £30.99  
Kindle Daily Deal
Kindle Daily Deal: Up to 70% off
Each day we unveil a new book deal at a specially discounted price--for that day only. Learn more about the Kindle Daily Deal or sign up for the Kindle Daily Deal Newsletter to receive free e-mail notifications about each day's deal.

Product Description


Praise for The Rails Way


"For intermediates and above, I strongly recommend adding this title to your technical bookshelf. There is simply no other Rails title on the market at this time that offers the technical depth of the framework than The Rails™ 3 Way."

—Mike Riley, Dr. Dobb’s Journal


"I highly suggest you get this book. Software moves fast, especially the Rails API, but I feel this book has many core API and development concepts that will be useful for a while to come."

—Matt Polito, software engineer and member of Chicago Ruby User Group


"This book should live on your desktop if you’re a Rails developer. It’s nearly perfect in my opinion."

—Luca Pette, developer


"The Rails™ 3 Way is likely to take you from being a haphazard poke-a-stick-at-it programmer to a deliberate, skillful, productive, and confident RoR developer."

—Katrina Owen, JavaRanch


"I can positively say that it’s the single best Rails book ever published to date. By a long shot."

—Antonio Cangiano, software engineer and technical evangelist at IBM


"This book is a great crash course in Ruby on Rails! It doesn’t just document the features of Rails, it filters everything through the lens of an experienced Rails developer—so you come out a pro on the other side."

—Dirk Elmendorf, cofounder of Rackspace Inc. and Rails developer


"The key to The Rails Way is in the title. It literally covers the 'way' to do almost everything with Rails. Writing a truly exhaustive reference to the most popular web application framework used by thousands of developers is no mean feat. A thankful community of developers that has struggled to rely on scant documentation will embrace The Rails Way with open arms. A tour de force!"

—Peter Cooper, editor, Ruby Inside: The Ruby Blog


"In the past year, dozens of Rails books have been rushed to publication. A handful are good. Most regurgitate rudimentary information easily found on the Web. Only this book provides both the broad and deep technicalities of Rails. Nascent and expert developers, I recommend you follow The Rails Way."

—Martin Streicher, chief technology officer, McClatchy Interactive, former editor in chief of Linux Magazine


"Hal Fulton’s The Ruby Way has always been by my side as a reference while programming Ruby. Many times I had wished there was a book that had the same depth and attention to detail, only focused on the Rails framework. That book is now here and hasn’t left my desk for the past month."

—Nate Klaiber, Ruby programmer


"I knew soon after becoming involved with Rails that I had found something great. Now, with Obie’s book, I have been able to step into Ruby on Rails development coming from .NET and be productive right away. The applications I have created I believe to be a much better quality due to the techniques I learned using Obie’s knowledge."

—Robert Bazinet,, .NET, and Ruby community editor and founding member of the Hartford Ruby Brigade


"Extremely well written; it’s a resource that every Rails programmer should have. Yes, it’s that good."

—Reuven Lerner, Linux Journal columnist

Product Description

The “Bible” for Rails Development: Now Fully Updated for Rails 4.1


"When I read The Rails Way for the first time, I felt like I truly understood Rails for the first time.”

—From the Foreword by Steve Klabnik


Ruby on Rails 4 is leaner, tighter, and even more valuable to professional web developers. More than ever, it helps you focus on what matters most: delivering business value via clean and maintainable code.


The Rails 4 Way is the only comprehensive, authoritative guide to delivering production-quality code with Rails 4. Kevin Faustino joins pioneering Rails developer Obie Fernandez to illuminate the entire Rails 4 API, including its most powerful and modern idioms, design approaches, and libraries. They present extensive new and updated content on security, performance, caching, Haml, RSpec, Ajax, the Asset Pipeline, and more.


Through detailed code examples, you’ll dive deep into the Rails 4 code base, discover why Rails is designed as it is, and learn how to make it do exactly what you want. Proven in dozens of production systems, this book’s techniques will maximize your productivity and help you build more successful solutions. You’ll want to keep this guide by your computer—you’ll refer to it constantly.


This guide will help you

  • Build powerful, scalable REST-compliant APIs
  • Program complex program flows using Action Controller
  • Represent models, relationships, CRUD operations, searches, validation, callbacks, and more
  • Smoothly evolve application database schema via Migrations
  • Apply advanced Active Record techniques: single-table inheritance, polymorphic models, and more
  • Create visual elements with Action View and partials
  • Optimize performance and scalability with view caching
  • Master the highly productive Haml HTML templating engine
  • Make the most of Rails’ approach to session management
  • Secure your systems with Rails 4’s improved authentication and authorization
  • Resist SQL Injection, XSS, XSRF, and other attacks
  • Extend Rails with popular gems and plugins, and learn to write your own
  • Integrate email services with Action Mailer
  • Use Ajax via Rails 4 support for unobtrusive JavaScript
  • Improve responsiveness with background processing
  • Leverage Asset Pipeline to simplify development, improve perceived performance, and reduce server burdens
  • Accelerate implementation and promote maintainability with RSpec

Product details

  • Format: Kindle Edition
  • File Size: 29283 KB
  • Print Length: 880 pages
  • Simultaneous Device Usage: Up to 5 simultaneous devices, per publisher limits
  • Publisher: Addison-Wesley Professional; 3 edition (26 May 2014)
  • Sold by: Amazon Media EU S.à r.l.
  • Language: English
  • Text-to-Speech: Enabled
  • X-Ray:
  • Word Wise: Not Enabled
  • Amazon Bestsellers Rank: #236,400 Paid in Kindle Store (See Top 100 Paid in Kindle Store)
  •  Would you like to give feedback on images?

More About the Authors

Discover books, learn about writers, and more.

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

There are no customer reviews yet on
5 star
4 star
3 star
2 star
1 star
Most Helpful Customer Reviews on (beta) 4.6 out of 5 stars  17 reviews
11 of 12 people found the following review helpful
5.0 out of 5 stars The best Rails 4.1 reference book 3 Jun. 2014
By Josh - Published on
I'm always suspicious when I see many positive reviews of a product posted immediately after the product is listed at Amazon. I assume the reviews are written by the creators and maybe their friends and family. But in the case of The Rails 4 Way, the initial positive reviews are likely written by people like me and the reviewer named kamera who have been happily reading DRM-free digital copies of The Rails 4 Way that we bought months ago.

As I wrote in my negative review of another Rails book listed at Amazon, The Rails 4 Way has great coverage of all the new features in Rails 4 (unlike certain Rails books). Also, The Rails 4 Way has been updated to include coverage of Rails 4.1 features, including Spring, secrets.yml, etc. I'm surprised that the Book Description section here at Amazon doesn't mention Rails 4.1.

I buy just about every Rails book that's published and I toss them all in a directory that's indexed for full-text searching. In the past, when I wanted more info about a Rails feature than what is provided by the official Rails documentation and Rails Guides, I searched my library of books. But lately, when I want more info, I just open The Rails 4 Way. It usually has what I'm looking for. As the introduction of The Rails 4 Way states, "This book is not a tutorial or basic introduction to Ruby or Rails. It is meant as a day-to-day reference for the full-time Rails developer." This is how I use The Rails 4 Way, and it's the best Rails reference book I own.

My only complaint is that my DRM-free PDF edition of The Rails 4 Way doesn't include an index. I see that the print edition does include a index, but the preview of the Kindle edition doesn't show an index. If you plan to buy the Kindle edition and you want an index, I'd recommend contacting the publisher to ensure that an index is included in the Kindle edition.
1 of 1 people found the following review helpful
5.0 out of 5 stars is a great reference book that covers most of what a Rails ... 13 Sept. 2014
By Y. Segal - Published on
"The Rails 4 Way", is a great reference book that covers most of what a Rails developer is likely to need on a daily basis. It covers the various DSLs and idioms (i.e. route definition, controller filter declaration, ActiveModel association and validations, etc) without getting into the details of Rails internals and how those features are implemented. The explanations are clear and the code examples relevant.

Just like Rails itself, "The Rails 4 Way" is opinionated and occasionally differs from the omakase way; Most notoriously, but hardly controversial, using Haml as a template engine and Rspec for testing.

Most of the book can be read cover-to-cover or used as a reference on particular topics. The exception is section about rails helpers (Chapter 11) which, as the author themselves point out, is really just an alphabetical listing of the methods available, like the one usually found on appendices or online documentation.

I recommend this book to new Rails developers (maybe after trying out an online tutorial) and for experienced Rails developers who are still working on Rails 3 (or 2!) and are expecting to make the jump to Rails 4 in the near future.
5.0 out of 5 stars Best Rails Book Available 11 Dec. 2014
By mike - Published on
Format:Paperback|Verified Purchase
This book is amazing.

I jumped into this book pretty green as far as web development is concerned. I have a lot of experience on the front-end but had only dabbled on the back-end. I did have basic Ruby and Rails experience but nothing major. I really wanted to learn my way around Rails but also understand how and why things worked the way they did. This book really helped to answer those questions.

The first few chapters were a bit difficult to get through primarily because it was very basic information (configuration, Rails routing, REST, etc.). After that, it got really exciting (for me) as it dove into the specifics of the framework.

I highly recommend this book to anyone wanting to learn more about Rails and I think it's suitable for almost any experience level. There are certain topics that were too complex for me to understand in the context of the book, so I used a flashcard as my bookmark and wrote down any concepts that were difficult. Googling it and rereading that section of the book really helped get the point across.

If I had to pick one negative about the book, it would be that it is opinionated as far as configuration. This can be assumed, though, because it is documenting the Rails Way. For instance, Haml and Rspec are used extensively over ERb and TestUnit. I had no experience with these prior to the book, but was excited to learn about them because they do seem to be the go-to libraries for big Rails shops (Hashrocket, Thoughtbot, etc.)

Overall, 5/5. I've read it once and picked up a lot of knowledge. I plan to use it extensively and re-read sections as needed when an issue arises. If you're a complete beginner, I'd start off with the Hartl tutorial and then go through this book.
1 of 1 people found the following review helpful
5.0 out of 5 stars Truly a Rails 4 reference book 14 Sept. 2014
By Elmer A. Sia - Published on
Format:Paperback|Verified Purchase
I bought this book to be my go-to reference book for Rails 4 development. I love everything that I'm reading so far, and I believe this book is truly indispensable for the full-fledged Rails developer.
2.0 out of 5 stars Tree-killer! 10 Dec. 2014
By Costa Michele - Published on
Obie's book stands still after several years (i read the first edition), like a stone monolith scattered by the wind.
I try to use the new edition to get some clue on the new rails 4, but eventually fallback to the online guides...
Don't get me wrong, the author (a rails pioneer) is smart enough to introduce the new features by advising of the limitations as well (eg lack of OO design), and is difficult to complain about lack of details here.
What really upset me are two things:
1. verbosity: who does need a complete static reference today, when everyone has a connected-smartphone to look (faster) at living documentation? (ok, is advised on book description, but i feel it sounds more like an excuse)
2. examples: they are awful! Too many times i read "ok, forgive me for this" or "do not do that in prod". I ponder what's the point for such useless examples, since they provide no real tips on current topic, nor they enhance the reader's knowledge...
At the end (i have to admit, i skipped many paragraphs) you have the feeling that book like this are not so relevant for today's programmers, at least assuming that many of you already know what rails is aimed for.
I rather prefer much smaller, well focused volumes, that are dense of useful information and avoid killing a century-old tree to be printed out!
Were these reviews helpful?   Let us know

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
First post:
Prompts for sign-in

Search Customer Discussions
Search all Amazon discussions

Look for similar items by category