- Clone the repository:
git clone https://github.com/jamesfzhang/mvsic.git
- Install gems
bundle install
- Setup Postgres
Download and install Postgres.app
Add export PGHOST=localhost to ~/.bash_profile then source ~/.bash_profile
- Setup Postgres role
In terminal, open up psql: psql then run create role mvsic with createdb login password 'password'
- Create, migrate, and seed databases
bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rake db:seed
- Set up
.envfile at root
touch .env
Ask James for Mailchimp's API key and add it like so to .env:
MAILCHIMP_API_KEY: '123456'
- Start redis
If you don't have redis, install it first via homebrew
brew install redis
Once it's installed, start it
redis-server &
- Start server
bundle exec rails s
Capture database backup
heroku pgbackups:capture
Download it
curl -o latest.dump heroku pgbackups:url``
Run this and replace 'jameszhang' with your username
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U jameszhang -d mvsic_development latest.dump