Rails Capistano Deployment

Posted by Joel Jensen Mon, 29 May 2006 23:05:00 GMT

I got Capistrano to work. Deployments now are a one line thing.

The issue I had was that the subversion repositroy I had used was http://localhost, this wont work since localhost in this context actually referrs to localhost of the remote machine that capistrano is ssh’d into.

I set up a external SVN repository and it was golden. Except for database migrations.

Capistrano will not execute commands on your local machine as far as I can tell.

Data Migrations in rails only migrate the schema changes, Yeah you can programmaticly add data via ruby. But this is a pain when you have a million rows of data.

I solved it by doing a mysqldump of the data, gzip it to save time, and use the capistrano “put” function to upload the data, then insert it into mysql on the server end.

Its not as clean as simply “rake deploy” but I can run 2 additional commands if I need.