-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs for open sourcing the app (#611)
- Loading branch information
Showing
5 changed files
with
73 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
OVERMIND_PROCFILE=Procfile.dev | ||
HIVEMIND_PROCFILE=Procfile.dev | ||
APP_HOST=http://localhost | ||
PORT=3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,62 @@ | ||
# GIVING CONNECTION | ||
# Giving Connection | ||
|
||
### Installation | ||
|
||
To run this project firstly you will need to install the following, | ||
considering you already have Ruby 3.0.2 and Homebrew installed: | ||
|
||
Install postgres | ||
> brew install postgres | ||
Install postgis | ||
> brew install postgis | ||
Install cmake | ||
> brew install cmake | ||
Install hivemind | ||
> brew install hivemind | ||
Install redis | ||
> brew install redis | ||
Install gem bundle | ||
> bundle install | ||
Install webpack | ||
> npm install webpack-dev-server -g | ||
> yarn install | ||
Connecting nonprofits with communities in Nashville and Atlantic City (for now!). | ||
|
||
### Credentials | ||
### Stack | ||
- Ruby on Rails 6.1.x | ||
- Ruby 3.1.x | ||
- Postgres and Postgis | ||
- Hotwire | ||
- Tailwind CSS | ||
- jsbundling and cssbundling | ||
|
||
To have access to the credentials you must: | ||
- Add master.key file inside config folder | ||
- Add secret key to the file | ||
|
||
### Set-up | ||
|
||
To set the project you will need the following commands: | ||
|
||
Bundle required gems | ||
> bundle install | ||
Create database | ||
> rails db:create | ||
Migrate database | ||
> rails db:migrate | ||
If your migration fails due to 'type "geography" does not exist' do the following: | ||
|
||
Associate postgres database with postgis: | ||
|
||
Run postgres: | ||
> psql postgres | ||
### Installation | ||
|
||
Inside of postgres command line: | ||
> \c giving_connection_development; | ||
1. Requirements | ||
- Bundler (`gem install bundler`) | ||
- Redis | ||
- cmake | ||
|
||
> CREATE EXTENSION Postgis; | ||
2. Clone the repository: `git clone xxxx` | ||
3. Install dependencies: `bundle install` and `yarn install` | ||
|
||
> exit | ||
### Setup | ||
1. Create database: `rails db:create` | ||
2. Associate postgres database with postgis: | ||
- Run postgres: `psql -d giving_connection_development` | ||
- Inside of postgres command line, run | ||
``` | ||
CREATE EXTENSION IF NOT EXISTS postgis; | ||
exit | ||
``` | ||
- Run `rake db:gis:setup` | ||
3. Start redis with `redis-server` | ||
4. Run `rails db:migrate` and `rails db:seed` | ||
5. Run `bin/dev` to start the server | ||
6. Visit `localhost:3000` in your browser | ||
|
||
### Populate database | ||
For running the app with Docker, check out the [Docker README](.dockerdev/README.md) | ||
|
||
> rails db:seed | ||
### Contributing | ||
|
||
### Run server | ||
1. Fork the repository | ||
2. Create a new branch | ||
3. Make your changes | ||
4. Push your changes to your fork | ||
5. Create a pull request | ||
|
||
> redis-server | ||
#### Linting and Formatting | ||
|
||
> rails s or hivemind | ||
We use Standard Ruby for linting and formatting. | ||
|
||
### Troubleshooting | ||
Run `bundle exec rubocop` to check all ruby files | ||
Run `bundle exec rubocop -a` to auto-correct offenses | ||
|
||
If you get the following error on local | ||
### Testing | ||
Run tests with `bundle exec rspec` | ||
|
||
>PG::UndefinedFunction: ERROR: function pg_search_dmetaphone(text) does not exist | ||
#### System specs | ||
|
||
Try performing a database reset. Do not use ´rails db:reset´ but run ´rails db:drop´ ´rails db:create´, ´rails db:migrate´ and ´rails db:seed´ instead. | ||
- Headless is the default config. If you want to see the browser you can run the following command: `HEADLESS=false bundle exec rspec` | ||
- If you want to pause the execution you can use `pause` inside an `it` statement. | ||
- If you want to see the logs you can use `:log`, e.g. `it "xxx", :log do` |