Sunday, January 27, 2008

Moving from Development to Production mode in RoR is as easy as ABC

Assuming that you have completed and tested your application now its time switch to production mode,
simple type the following to migrate to your production database

$ rake RAILS_ENV=production db:migrate

I have heard a lot of stories about how to do this one, whats your story ?

Also sometimes after modifying and adding attributes to the

class TableNames < ActiveRecord::Migration

and then doing rake db:migrate you realize that the database hasn't been updated.Simply go into the database schema and modify the tables .It isn't much pain anyway. I experienced this when managing my database using phpmyadmin.
Refresh the browser and there we are ......all good.

No comments: