-
Notifications
You must be signed in to change notification settings - Fork 349
Manual install on macOS
- 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
- 7. Install LaTeX to generate 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
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
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
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
Follow the Generating PDFs guide to assist with installing LaTeX to generate PDFs. This step is optional unless you wish to generate PDF submissions.