On the server:
$ /etc/init.d/unicorn stop
On the server, in mysql client:
mysql> DROP DATABASE <database_name>;
mysql> CREATE DATABASE <database_name> DEFAULT CHARACTER SET utf8;
Make sure that encoding is set to utf8
in config/database.yml
file.
$ git pull
$ bundle exec cap production deploy
This will run migrations automatically and start unicorn.
On the server, run db:seed using the following command:
$ RAILS_ENV=production bundle exec rake db:seed