|
Deploying Rails Applications: A Step-by-Step Guide
First you'll learn how to build out your shared, virtual, or
dedicated host. Then, you'll see how to build your
applications for production and deploy them with one step,
every time. Deploying Rails Applications will take you from
a simple shared host through a highly scalable clustered and
balanced setup with Nginx.
See
how to tell whether you've bought enough firepower, and
learn how to optimize your Rails projects applications in a
systemic, rational way. Take advantage of advanced caching
techniques, and become and expert with the latest servers in
Nginx and Mongrel. Don't worry. You'll get a dose of Apache
too.
Not only will you learn how to configure your production
environment, you'll also see how to monitor it with free,
automated tools that can restart your servers when the
memory use gets too high for comfort. You'll see how to take
a performance baseline, profile for bottlenecks, and solve
the most common performance problems you're likely to see.
You'll learn:
Everything from source control and migrations to Capistrano,
rake tasks and beyond.
Directly from authors who run EngineYard, one of the best
Rails hosts in the business.
How to deploy your applications to multiple production
servers with a single command using Capistrano.
How to setup a Rails/Nginx/Mongrel cluster for applications
with high scalabilty needs.
...and more!
CONTENTS:
* REST and Routes Recipes
o Create A RESTful Resource
o Add Your Own RESTful Actions
o Nest Resources to Scope Access
o Toggle Attributes with AJAX
o Authenticate REST Clients
o Respond To Custom Formats
o Catch All 404s
* Database Recipes
o Add Foreign Key Constraints
o Write Custom Validations
o Take Advantage of Master/Slave Databases
o Siphon Off SQL Queries
o Use Fixtures For Canned Datasets
* User Interface Recipes
o Handle Multiple Models In One Form
o Replace In-View Raw JavaScript
o Validate Required Form Fields Inline
o Create Multi-Step Wizards
o Customize Error Messages
o Upload Images with Thumbnails
o Decouple JavaScript with Low Pro
o Format Dates and Times
o Support An iPhone Interface
* Search Recipes
o Improve SEO with Dynamic Meta Tags
o Build a Sitemap
o Quick & Dirty Search
o Full-Text Search with Ferret
o Full-Text Search with Sphinx
o Solr-Power Your Search
* Design Recipes
o Freshen Up Your Models With Scope
o Create Meaningful Relationships Through Proxies
o Keep Forms DRY and Flexible
o Prevent Train Wrecks
o Simplify Controllers With a Presenter
* Integration Recipes
o Process Credit Card Payments
o Play Nice with Facebook
o Mark Locations On a Google Map
o Tunnel Back to Your Application
* Console Snacks
o Writin' Console Methods
o Console Loggin'
o Playin' In the Sandbox
o Accessin' Helpers
o Shortcuttin' the Console
* Asynchronous Processing Recipes
o Send Lightweight Messages
o Off-Load Long-Running Tasks to BackgrounDRb
o Process Asynchronous, State-Based Workflows
* E-mail Recipes
o Validate E-mail Addresses
o Receive E-mail Reliably via POP or IMAP
o Send E-mail Via Gmail
o Keep E-mail Addresses Up To Date
* Testing Recipes
o Maintain Fixtures Without Frustration
o Describe Behavior from the Outside-In With RSpec
o Test First with Shoulda
o Write Domain-Specific RSpec Matchers
o Write Custom Testing Tasks
o Test JavaScript With Selenium
o Mock Models with FlexMock
o Track Test Coverage with RCov
o Automatically Validate HTML
o Mock With a Safety Net
o Drive a Feature Top-Down with Integration Tests
* Performance and Scalability Recipes
o Cache Data Easily
o Look Up Constant Data Efficiently
o Profile In The Browser
o Cache Up With the Big Guys
o Dynamically Update Cached Pages
o Use DTrace for Profiling
* Security Recipes
o Constrain Access to Sensitive Data
o Encrypt Sensitive Data
o Flip On SSL
* Deployment and Capistrano Recipes
o Upload Custom Maintenance Pages
o Generate Custom Error (404 and 500) Pages
o Config Files On-The-Fly
o Create New Environments
o Run Multi-Stage Deployments
o Safeguard the Launch Codes
o Automate Periodic Tasks
o Preserve Files Between Deployments
o Segregate Page Cache Storage with Nginx
o Load Balance Around Your Mongrels' Health
o Respond To Remote Capistrano Prompts
o Monitor (and Repair) Processes with Monit
* Big-Picture Recipes
o Manage Plugin Versions
o Fail Early
o Give Users Their Own Subdomain
o Customize and Analyze Log Files
|