brew install postresql
brew services start postresql
Add a database for development
psql postgres
CREATE DATABASE "dataupstream_development";
CREATE ROLE dataupstream LOGIN PASSWORD 'dataupstream';
GRANT ALL PRIVILEGES ON DATABASE dataupstream_development TO dataupstream;
By default, the RAILS_ENV is set to 'development'
export RAILS_ENV=development
bin/rake db:migrate
bin/rails s
Below are the generic steps to setup production:
RAILS_ENV=production rake secret
#!/bin/bash
export RAILS_ENV=production
export SECRET_KEY_BASE=<secret key from step 1>
export PORT=
4. Source this file
```source <your file>```
5. Migrate your production database
```rails db:migrate```
6. Set the eager_load in production.rb to false, else you will get uninitialized constant error.
This is one small nuisance, refer to here for details: https://github.com/rails/spring/issues/519
```config.eager_load = false```
7. Start the server
```rails s```
8. You may access the server from ```<your machine address:port>```
If it's local, then ```http://localhost:<port>```
see the doc in .... [todo]
* (j)Ruby version
See the .ruby-version file in repo.
* System dependencies
* software developers
### testing
* testing
./bin/bundle install
./bin/bundle exec rspec
### interface with jupyter
pip install jupyter
cd APP_DIR/python-notebooks
jupyter
get the notebooks from: ...... [todo]
### [todo]
* Configuration
* Database creation
* Database initialization
* How to run the test suite
* Services (job queues, cache servers, search engines, etc.)
* Deployment instructions