Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App should fail on start if ORI setup is incomplete #29

Closed
wetchler opened this issue Nov 1, 2016 · 0 comments
Closed

App should fail on start if ORI setup is incomplete #29

wetchler opened this issue Nov 1, 2016 · 0 comments

Comments

@wetchler
Copy link

wetchler commented Nov 1, 2016

Tried creating an instance, but I forgot to do steps 3 and 4 of installation:

3.
cp data/ori.csv.example data/ori.csv
4.
docker-compose build data
docker-compose run data

When I built the instance and ran it, the app splash page (for example) loaded fine. When I went to the dashboard, I got an "Ooops" page. The app's logs showed:

NameError (uninitialized constant Constants::CONTRACTING_ORIS):
  app/models/user.rb:77:in `contracting_oris'
  app/models/user.rb:81:in `allowed_oris'
  app/queries/get_all_incidents_query.rb:10:in `perform_query'
  app/queries/query.rb:6:in `run'
  app/queries/dashboard_incidents_query.rb:8:in `perform_query'
  app/queries/query.rb:6:in `run'
  app/controllers/incidents_controller.rb:155:in `set_incidents'

It took me some head scratching to figure this out. Instead, there should be an initializer function that throws a fit when the app boots, with an informative message, and the app should never start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants