I'm curious about where I should run "rake db:migrate RAILS_ENV="production" when I'm deploying to my server. Should I run it locally and then deploy? Or should I deploy then run the migration from the /current directory on the server? Thanks in advance!
Asked
Active
Viewed 92 times
1 Answers
1
Are you using capistrano to deploy? If so, running "cap deploy:migrations" from your development machine, will deploy and run the migrations on the server at the same time.
If you have a more complicated deployment recipe or have sharding or replication, you could run "cap deploy:update_code", which will only copy your project. Then you can login to the server and run the migrations locally.

badams
- 252
- 3
- 14