See new repo for up to date code: https://github.com/Commoddity/commons-api
This README would normally document whatever steps are necessary to get the application up and running.
Things you may want to cover:
-
System dependencies
-
Configuration
-
Database creation
-
Database initialization
-
How to run the test suite
-
Services (job queues, cache servers, search engines, etc.)
-
Deployment instructions
-
...
- Ruby: 2.7.0
- Rails: 6.0.2.1
- install
yarn - run
bundle install
External guide: https://www.daveferrara1.com/ruby-in-rails-switch-from-sqlite3-to-postgres/
- create a development user
- create a copy of the
config/secrets.yml.exampleand rename it toconfig/secrets.yml. - change the username and password to your development user and password
- add your uclassify read and write keys
- create a copy of the
- log in to the postgres with the dev user and create the dev and test database
CREATE DATABASE commons_development;
CREATE DATABASE commons_test;During development it may be necessary to reset the database. If so, do the following actions:
rake db: drop
# drops database
in PSQL:
CREATE database commons_development;
CREATE database commons_test;
# creates database again
rake db:reset
# seeds database with categories and session
rake db:update_database
# populates database with bills from legisINFO (takes about a minute and a half)
# if you see Rescue exceptions in the console it means it's working as it should
To setup rspec testing environment, run
rake db:test:prepare
rake db:test:load