-
Notifications
You must be signed in to change notification settings - Fork 349
Manual install on macOS
- Table of Contents
- 1. Install Homebrew and Homebrew Cask
- 2. Install rbenv and ruby-build
- 3. Install Postgres
- 4. Install native tools
- 5. Install Doubtfire API dependencies
- 6. Create and populate Doubtfire
- Generating PDFs
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
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
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;
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
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
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
See: [Generating PDFs] (https://github.com/doubtfire-lms/doubtfire-api/wiki/Generating-PDFs)