-
Notifications
You must be signed in to change notification settings - Fork 409
Manual install on Linux
- 1. Install rbenv and ruby-build
- 2. Install Postgres
- 3. Install native tools
- 4. Install Doubtfire API dependencies
- 5. Create and populate Doubtfire
- 6. Install LaTeX to generate PDFs
Make sure you have git installed, along with a C compiler, and a few other tools you will need. For example:
sudo apt update
sudo apt-get install -y git build-essentials git curl pythonInstall rbenv and ruby-build:
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELLnote: if you're using zsh (with tools like Oh-My-Zsh), add to your .zshrc:
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.zshrcNow install Ruby v2.6.7:
sudo apt-get install -y libssl-dev zlib1g-dev libreadline-dev
rbenv install 2.6.7Install Postgres:
sudo apt-get install postgresql \
postgresql-contrib \
libpq-devEnsure pg_config is on the PATH, and then login to Postgres. You will need to locate where apt-get has installed your Postgres binary and add this to your PATH. You can use whereis psql for that, but ensure you add the directory and not the executable to the path
whereis pqsl
export PATH=/usr/bin:$PATH
sudo -u postgres createuser --superuser $USER
sudo -u postgres createdb $USER
psqlCreate the Doubfire user the following at the Postgres prompt:
CREATE ROLE itig WITH CREATEDB PASSWORD 'd872$dh' LOGIN;
Install imagemagick, libmagic and ghostscript. You will also need to
install the Python pygments package:
sudo apt-get install ghostscript \
imagemagick \
libmagickwand-dev \
libmagic-dev \
python3-pygmentsClone project and change your working directory to the api:
git clone https://github.com/doubtfire-lms/doubtfire-api.git
cd ./doubtfire-apiThen install Doubtfire API dependencies using bundler:
gem install bundler -v1.17
rbenv rehash
bundle install --without production replica stagingWhilst 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.