Skip to content

Instantly share code, notes, and snippets.

@ozgun
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozgun/9797ba91d17de471c6ac to your computer and use it in GitHub Desktop.
Save ozgun/9797ba91d17de471c6ac to your computer and use it in GitHub Desktop.
instructions

Stop unicorn.

On the server:

$ /etc/init.d/unicorn stop

Drop & re-create database

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.

Pull

$ git pull

Deploy

$ bundle exec cap production deploy

This will run migrations automatically and start unicorn.

run db:seed

On the server, run db:seed using the following command:

$ RAILS_ENV=production bundle exec rake db:seed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment