Skip to content

Manual install on macOS

Andrew Cain edited this page Nov 20, 2018 · 10 revisions

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 at version 6, libmagic and ghostscript using Homebrew:

$ brew install imagemagick@6 libmagic ghostscript
$ brew link imagemagick@6 --force

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

Set up overcommit and install hooks:

$ gem install overcommit
$ rbenv rehash
$ overcommit --install

Then install Doubtfire API dependencies using bundler:

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

6. Create and populate Doubtfire

Whilst still in the Doubtfire API project root, execute:

$ bundle exec rake db:create

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

$ bundle exec rake db:populate

7. Install LaTeX to generate PDFs

Follow the Generating PDFs guide to assist with installing LaTeX to generate PDFs. This step is optional unless you wish to generate PDF submissions.