Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Installation

Kyle Hodgetts edited this page Mar 23, 2016 · 7 revisions

Pre-requisites

You will need to have the following installed on your machine

  • Ruby has instructions for Windows, MacOS and Linux
  • Ruby on Rails installation tutorial provided by installrails.com
  • Node which NPM comes packaged in
  • PostgreSQL

Setting up the Postgres user

For database authentication, hiTour uses the default user with name postgres and password password for local development only!

To set up this user, you need to have installed postgres. One it is installed, follow these steps

  • sudo -u <username> -i
  • createuser -P -s -e postgres - this will create the user postgres as a super user
  • Enter password for new role: password
  • Enter it again: password
  • exit to exit postgres command prompt

Documentation for further reference

We have written a make file to make installing the app's dependencies and setting up the rest of the environment easy.

Dependencies

To install all gems and node modules, run make install

Environment

Next you will need to set up the environment file, used by the Figaro gem to configure the application.

Run make env

This will create an application.yml file inside the config directory and insert placeholder values XXX for the keys you need to provide yourself.

Leave the keys that have been provided for you, they don't change.

Database setup

In this step, you will set up the database schema in your local database, carry out any migrations that are pending (all of them for first time set up) and populate the database with our test seed data, including the user account you will need to sign in with!

Run make setup

Running the server

And that's it! Everything is set up. You can now run make start to start the local thin web server. By default this is run on port 3000, but you can specify your own port by passing a port parameter to the command

make start port=8080 will start the thin server on port 8080.

Other instructions can be found the README about how to log in and contribute

Thanks for reading.