Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Mike Riley

Dr. Dobb's Bloggers

Deploying Rails Applications Book Review

May 18, 2008

When I first received Pragmatic Bookshelf's Deploying Rails Applications: A Step By Step Guide by Rails community superstar Ezra Zygmuntowicz and authoring partners Bruce Tate, Clinton Begin with Geoffrey Grosenbach and Brian Hogan, I expected to finish reading this 260+ page book in a single sitting.  After all, what was so special and challenging about SCP'ing files via rsync? 

Ezra, who co-founded Rails hosting company Engine Yard (check out my two part interview with Engine Yard CTO Tom Mornini for more about the company and some of the Ruby projects Ezra is responsible for there), shares his experiences and certainly elevated my understanding and appreciation for the complexities of deploying a manageable, repeatable, scalable Rails application.  

Anyone who has written even a simple Rails app for more than a handful of end users will be familiar with Rails-related technologies like Capistrano and Mongrel but learning the ins, outs and best practices of these tools for me was a process of culling through spotty online documentation, newsgroup, IRC and various forum postings and more occasionally than not, trial and error.  Fortunately for those tasked with not only writing a Rails application but also responsible for its care and feeding in a released production environment state, Deploying Rails Applications is a remarkably helpful manual. 

The book begins with what should be obvious to any rational developer - the need for source control management (to quote the authors, "Running without version control these days is madness").  Subversion is the tool of choice and is used as the SCM model throughout the book.  While its promotion of SVN is adequate, I would have also liked the authors explore a tool like Git to show how other source controls options could have been used in this context.  Once convinced that using something like SVN lies at the heart of a sustainable deployment, the book moves on to preparing code for production via isolating those files to be SVN-managed, database configuration, migration and security considerations, and deciding between a shared hosting or a dedicated server with or without a virtual machine environment.

Mid-way through the book, Chapter 5 discusses the relatively powerful automated application deployment tool Capistrano.  This evolving utility honestly deserves a book of its own; I suspect it won't be very long before a Capistrano Cookbook appears on the shelves, extolling the virtues of this tool that can be used far beyond its Rails application deployment roots.  However, in the scope of this book, its use zeros in on a strict scenario - pushing out a Rails app to a server host(s) in a robust and repeatable fashion.  It is the hard earned details that prop the value of Deploying Rails Applications beyond the README's and buried threads available to anyone patient enough to dig for them on the Internet.  For the rest of us who are constantly pressured by deadlines and commitments, the succinct steps and explanations in this chapter save both time and sanity.

Once the basics of Capistrano are grok'd, it's on to the task of clustering Mongrels.  Mongrel, for the Rails-uninitiated, is a Ruby-based application server that "is rapidly becoming the defacto standard for serving Rails applications."  Like the chapter on Capistrano, the three chapters on Mongrel configuration, clustering and performance optimization will be priceless to organizations basing their business on the Rails framework.  Lastly, the book concludes with a brief 4 page chapter on the future of Rails deployment, touting that the landscape will continue to shift thanks to the rapid evolution of the base technology coupled with next generation Ruby interpreters like Yarv, Rubinius, JRuby and IronRuby.

Deploying Rails Applications is a must-have title for Rails developers and maintainers.  Like most Pragmatic Bookshelf titles, its content is free of superfluous fluff and impractical theory and instead is a gift of valuable information for developers and sysadmins who are being faced with the realization that a more capable and sane solution beyond rsync for Rails app deployment does indeed exist.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.