Development --> Production

I new to Rails and I want to understand the procedure to move from
development to production: this has got to be a simple procedure, but I
haven’t found it documented anywhere that I understand it. (I have both
editions of the Agile Web Dev book & have looked online in dozens of
places). I’m positive I’m missing something obvious.

Here’s what I’m after:

I’ve been developing an app “nc3” using the nc3_development database. I
have gone through and created / updated the database multiple times
using
migrations and now I want to transfer the schema from nc3_development to
n3_production, which is an empty database with no schema. I figured
there
was something like a rake task or script to do this, but I haven’t found
anything to do it…

When I look for info about this, everything talks about capistrano,
multiple servers, scaling and a bunch of other things I won’t ever need
on
my 2 cent app.

Thanks


Andrew Mansfield
Product Design & Development
KI
Green Bay, WI


Print On-Demand Price Lists! Accurate access, up-to-the minute pricing
documents 24/7. Web and print versions with new color addendum.
http://www.ki.com/pricelists/pricelists.asp?CMP=EMC-M6H981003554


CONFIDENTIALITY NOTICE: This e-mail, including attachments, is intended
solely for the person or entity to which it is addressed and may contain
confidential, privileged and/or proprietary information. Any review,
dissemination, distribution, copying, printing, or other use of this
e-mail by persons or entities other than the addressee or his/her
authorized agent is prohibited. If you have received this e-mail in
error, please contact the sender immediately and delete the material
from your computer.

migrations and now I want to transfer the schema from nc3_development to
n3_production, which is an empty database with no schema. I figured there
was something like a rake task or script to do this, but I haven’t found
anything to do it…

There is a rake task… same one you use to run the migrations against
your development environment… You just need to ensure that RAILS_ENV
is
set to ‘production’ and that your database.yml has the right info for
the
production database.

Then you should be able to do something like this (at least in bash):

RAILS_ENV=production rake db:migrate

-philip

Hi Andrew,

Andrew Mansfield wrote:

I’ve been developing an app “nc3” using the nc3_development database. I
have gone through and created / updated the database multiple times using
migrations and now I want to transfer the schema from nc3_development to
n3_production, which is an empty database with no schema. I figured there
was something like a rake task or script to do this, but I haven’t found
anything to do it…

I think you’d just create your n3_production database and run your
current
migration on it. Make sure environment.rb and database.yml have the
correct
entries and you should be good to go.

hth,
Bill