PreparingADevelopmentEnvironment - PresConsUIUC/PSAP GitHub Wiki

These instructions will help you get a development instance of the PSAP application running in macOS.

Preparing your environment

1) Install the Xcode Command Line Tools

Open up a Terminal window and type gcc. This will cause an alert to pop up asking you to install the tools. Click Install. If no alert pops up, continue.

2) Install Homebrew

If Homebrew is already installed, skip this step. Otherwise, follow the instructions on the Homebrew home page.

3) Install dependencies:

(All the lines that begin with $ mean that you have to type them into a Terminal window, found in /Applications/Utilities. Omit the $.)

$ brew install git
$ brew install ImageMagick
$ brew install ffmpeg --with-x264 --with-a52 --with-libvpx --with-libvorbis
$ brew install postgres
$ brew install rbenv
$ rbenv init

4) Start the necessary services

$ brew services start postgresql

When you are not using the PSAP, you can do:

$ brew services stop postgresql

5) Check out the PSAP code:

$ git clone https://github.com/PresConsUIUC/PSAP.git psap
$ cd psap

6) Install Ruby

$ rbenv install "$(< .ruby-version)"

7) Install Bundler

$ gem install bundler

8) Install the gems required by the application:

$ bundle install

9) Configure the application

$ cp config/database.template.yml config/database.yml
$ cp config/psap.template.yml config/psap.yml

10) Get mail to work (optional)

At this point, the application is installed and ready to run, with one exception: if you want outgoing emails to work--necessary for new user signups, user account email address changes, and password resets:

  1. $ cp config/mail.template.yml config/mail.yml

  2. Open config/mail.yml and add your own settings. (If you are on the project, these already exist; contact a project member.)

Run the application

See RunningTheApplication.