Skip to content

Setting Up the Development Environment

Michiel de Jong edited this page Dec 12, 2019 · 2 revisions

Setting Up the Development Environment

Tip: There is a Dockerfile! You can run docker build . to easily build this project from source, using the Dockerfile.

Info

These instructions won't get you a working site, but they will help you work on the site!

Getting Started

First you'll need to clone the ToSBack2 and ToSBack3 repositories.

git clone git@github.com:tosdr/tosback2.git

git clone git@github.com:tosdr/ToSBack3.git

Obviously, The TB3 repo contains all the rails code, but the TB2 repo contains all the data!

To set up the required Ruby gems, I recommend you set up an RVM gemset and run:

bundle install

The last step is to prepare your local database by loading the DB schema:

rake db:schema:load

Importing the Rules and Versions

The next step is to import the XML policies from TB2 into the TB3 database by running the import_xml rake task from the TB3 directory. You must supply the path to your local TB2 repo!

rake xml:import_xml path=../tosback2/

This may take a few minutes to complete. It should populate the "Sites" and "Policies" tables, and begin each policy with an initial version. To import the older versions of policies from the TB2 repo, you can run:

rake versions:import_versions path=../tosback2/

Remember to supply the path information!

Develop!

If some aspects of the application aren't working correctly, let us know or have a go at fixing them! Have a look at this wiki page to see what we need to work on!