Book Image

Building Dynamic Web 2.0 Websites with Ruby on Rails

By : A P Rajshekhar
Book Image

Building Dynamic Web 2.0 Websites with Ruby on Rails

By: A P Rajshekhar

Overview of this book

<p>Ruby on Rails is an open-source web application framework ideally suited to building business applications; accelerating and simplifying the creation of database-driven websites. Often shortened to Rails or RoR, it provides a stack of tools to rapidly build web applications based on the Model-View-Controller design pattern.<br />&nbsp;<br />This book is a tutorial for creating a complete website with Ruby on Rails. It will teach you to develop database-backed web applications according to the Model-View-Controller pattern. It will take you on a joy ride right from installation to a complete dynamic website. All the applications discussed in this book will help you add exciting features to your website. This book will show you how to assemble RoR's features and leverage its power to design, develop, and deploy a fully featured website. Each chapter adds a new feature to the site, adding new knowledge, skills, and techniques.</p>
Table of Contents (16 chapters)
Building Dynamic Web 2.0 Websites with Ruby on Rails
Credits
About the Author
About the Reviewer
Preface
Index

Changing to the Production Environment


To change from the development environment to the production environment, you will need to do the following things:

  • Migrating to the Production database

  • Configuring Mongrel to start in the production mode

For the former, migration files can be very helpful.

Migrating to the Production Database

To migrate to the Production database, you will need to create a database named talewiki_production. Then, only RoR will use the production database. This is due to the 'Convention-over-Configuration' philosophy of RoR. When Mongrel runs in the production mode, it looks for the database whose name ends with _production. It will work only when such a database is found.

In order to migrate to the production database, first create a database named talewiki_production. Then open the database.yml file from the config folder. Modify it so that the content looks as follows:

#MySQL (default setup). Versions 4.1 and 5.0 are recommended.
#
#Install the MySQL driver:
# gem install...