Skip to content
Ahmed Issa edited this page Aug 22, 2016 · 6 revisions

Instructions on how to set up your Mac

##Backend

If you have problems with installing the pg gem try creating an env variable called ARCHFLAGS and set it to "-arch x86_64"

  1. Install ruby according to http://sourabhbajaj.com/mac-setup/Ruby/README.html
  2. Install ruby 2.1.4
  3. Set 2.1.4 to local ruby version: rbenv local 2.1.4
  4. Install postgresql
  5. Clone git repo
  6. Install "bundler" gem
  7. Run bundle install in application root
  8. bundle exec rake db:drop
  9. bundle exec rake db:create
  10. bundle exec rake db:migrate
  11. bundle exec rake db:seed
  12. rails serverto start the server

to run the tests use bundle exec rspec

Attach Heroku to the app

  1. heroku git:remote -a alumni-db-backend-dev -r heroku_staging
  2. heroku git:remote -a alumni-db-backend -r heroku_production

Reset Database on heroku

  1. heroku pg:reset DATABASE_URL --app alumni-db-backend-dev --confirm alumni-db-backend-dev
  2. heroku pg:reset DATABASE_URL --app alumni-db-backend--confirm alumni-db-backend