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

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..

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