Skip to content

Manual install on macOS

Jake Renzella edited this page Dec 13, 2016 · 10 revisions

Table of Contents

1. Install Homebrew and Homebrew Cask

Install Homebrew for easy package management, if you haven't already, as well as Homebrew Cask:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install caskroom/cask/brew-cask

2. Install rbenv and ruby-build

Install rbenv and ruby-build:

$ brew install ruby-build rbenv

Add the following to your .bashrc:

$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc

or, if you're using Oh-My-Zsh, add to your .zshrc:

$ echo 'eval "$(rbenv init -)"' >> ~/.zshrc

Now install Ruby v2.3.1:

$ rbenv install 2.3.1

3. Install Postgres

Install the Postgres App:

$ brew cask install postgres --appdir=/Applications

Ensure pg_config is on the PATH, and then login to Postgres:

$ export PATH=/Applications/Postgres.app/Contents/Versions/9.4/bin:$PATH
$ psql

Create the Doubfire user the following at the Postgres prompt:

CREATE ROLE itig WITH CREATEDB PASSWORD 'd872$dh' LOGIN;

4. Install native tools

Install imagemagick, libmagic and ghostscript using Homebrew:

$ brew install imagemagick libmagic ghostscript

You will also need to install the Python pygments package:

$ sudo easy_install Pygments

5. Install Doubtfire API dependencies

Clone project and change your working directory to the api:

$ git clone https://github.com/doubtfire-lms/doubtfire-api.git
$ cd ./doubtfire-api

Comply with DSTIL best practices using DSTIL's dotfiles repo. Run the following command to install DSTIL's dotfiles.

$ curl -s https://raw.githubusercontent.com/dstil/dotfiles/master/bootstrap | bash

Restart your terminal so that you can run dstil:

$ exec $SHELL
$ which dstil
dstil: aliased to /Users/Fred/.dstil/current/sources/1/files/labcheck

Set up overcommit and install hooks:

$ gem install overcommit
$ rbenv rehash
$ overcommit --install
$ dstil --sign

Then install Doubtfire API dependencies using bundler:

$ gem install bundler
$ rbenv rehash
$ bundle install --without production replica

6. Create and populate Doubtfire

Database Population

Whilst still in the Doubtfire API project root, execute:

$ rake db:create

You can choose to populate the database with some fake test data using:

$ rake db:populate

Generating PDFs

See: [Generating PDFs] (https://github.com/doubtfire-lms/doubtfire-api/wiki/Generating-PDFs)

Clone this wiki locally