Ruby on Rails Enterprise Application Development::
Plan, Program, Extend
www.PACKTPUB.com  FREE ONLINE EDITION: Read full chapters online, download free samples from the book and more...
Book Contents Index > Chapter 6
Introduction
1: Introduction
2: The Initial Problem
3: Laying the Foundations
4: Working with Rails Free Chapter
5: Building the User Interface
6: Into Production
7: Improving the User Experience
8: Extending the Application
9: Advanced Deployment

10: Down the Track

Appendix A: Running Your Own Gem Server

Index

Latest Updates

Free Chapter:

Chapter 4: Working with Rails [ 1.7 MB PDF]

Code Download

Contact us

Chapter 6: Into Production

Running a Rails application in the production environment is a crucial part of any project. It represents the successful completion of a working application and delivery of that application to its customer base. It is rarely the final stage. All applications we have worked on have needed modifying from their initial production incarnation.

  • So, what is needed to get a Rails application into the production environment?
  • A working Rails application.
  • A production server environment.
  • A system for transferring development Rails code to the production environment.

This chapter will describe how to create a Rails production environment. In particular, the decisions we need to make to successfully get a small business application up and running. Error handling in the production environment is a little different to that of the development environment and therefore some coverage of error handling is presented. We will also describe some systems that will make it easier to backup and restore your application.

Chapter 6: Into Production

  • An Application Ready for Production
  • The Application Server
    • Memory
    • Central Processor Unit–CPU
    • Hard Disks
    • Network Interface Card–NIC
    • Don't Forget Backup
    • Your First Production Server
  • Setting up the Server
    • Installing Ruby and Rails
    • Copying the Files to the Server
    • Using Subversion to Transfer the Application to the Production Environment
    • Excluding Files from the Repository
    • The Production Database
    • Separating Development and Production Databases
      • Localhost database–single database.yml
      • Separate Development and Production database.yml files
      • Using Migration in Production
      • The Rails Database User
    • The Web Server
      • Mongrel
      • Mongrel Service on Windows
      • Limitations of Mongrel
      • Mongrel behind Apache
      • Installing Apache
      • Apache on Linux and Mac OS X
      • Apache on Windows
      • Domain Name System (DNS)
      • Configuring Apache to Act as a Proxy for a Rails Application
  • Rory's Production Installation
    • Using Two Host Names to Simplify Routing
    • Rory Puts his Intranet Application into Production
  • Errors in Production
    • Slow List Rendering due to Placement of Additional Data Processing in Loop
      • Symptom
      • Cause
      • Fix
    • Application Error Following the Transferring of New Code to Production
      • Symptom
      • Cause
      • Solution
  • Back Up Rails
    • Backing Up the Code Repository
    • Back Up the Database
    • Combining Your Backup Scripts
  • Summary
   

 

Paperback 528 pages
Released: October 2007
ISBN: 1847190855
ISBN 13: 978-1-847190-85-7

     

 




View the book details
on PacktPub.com

 


 

  This website is owned and maintained by Packt Publishing Ltd, 2007. All rights reserved. Terms and Conditions