These steps assume you have followed PRX's Local Development Environment guide, which will install a number of dependencies. You can fulfill those dependencies however you'd like, but you may need alter the procedures in this document to match your environment.
-
Clone the project repository:
git clone https://github.com/PRX/dovetail-insights.git cd dovetail-insights
-
Install Ruby and other runtimes:
asdf install
-
Configure a dedicated local hostname in puma-dev:
echo 4203 > ~/.puma-dev/insights.dovetail.prx
You will access the local development server at http://insights.dovetail.prx.test or https://insights.dovetail.prx.test.
-
Configure BigQuery credentials
Create a file called
config/bigquery-keyfile.json
, and add JSON client credentials for Google Cloud that have access to the BigQuery database you want to use. If you're not sure which credentials to use or where to get them, please ask around. -
Configure local environment variables.
Make a copy of the example file.
cp env-example .env
Set
BIGQUERY_PROJECT
to the Google Cloud project name that contains the BigQuery database you want to use. SetBIGQUERY_CREDENTIALS
to the path of a file that contains BigQuery API credentials from above. (i.e.,./config/bigquery-keyfile.json
) -
Install Ruby gems.
bundle install
-
Install npm packages.
yarn install
Once your environment has been setup, you should be able to start the Rails server and load the site in a browser:
bin/rails s
The site will be available at insights.dovetail.prx.test.