This repository stores the code for the https://helpwithcovid.com/ website.
The stack is:
2.6.3
2.1.4
brew install rbenv
brew install postgresql
rbenv init
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
# source profile or restart shell, then:
rbenv install 2.6.3
rbenv local 2.6.3
gem install bundler
gem install rails
rbenv rehash
Install and start postgresql:
pg_ctl -D /usr/local/var/postgres start
pg_ctl -D /usr/local/var/postgres stop
)Install dependencies:
bundle install
yarn install
Setup the database and seed data:
rails db:setup
Create a .env
file with the following:
# sending emails
SMTP_USERNAME=project-email@gmail.com
SMTP_PASSWORD=email-account-password
SMTP_NOREPLY=no-reply@domain.com
# recaptcha for signups (without this the sign up won't work)
RECAPTCHA_SITE_KEY=
RECAPTCHA_SECRET_KEY=
# mailchimp integration (without this, initial db seeding with Gibbon will crash)
MAILCHIMP_API_KEY=
# blank slate volunteer integration (not sure how critical this is, but likely required)
BLANK_SLATE_USERNAME=
BLANK_SLATE_PASSWORD=
Replace the text to the right of the =
with the correct values.
rails server
Then go to http://localhost:3000 to view app
rails spec
Error text: Webpacker can't find stylesheets...
Remove node_modules
, yarn.lock
and package-lock.json
. Run yarn
to reinstall all frontend dependencies and try running the rails server again. Alternatively you can remove node_modules
only and try yarn install --frozen-lockfile
.
Try using localhost:3000
to run the site rather than 127.0.0.1
.
By default, emails are not sent when running in development, but you can make them work: Copy all the mailer
settings from config/production.rb
into config/development.rb
.
Migrations were probably not run. Run migrations using rails db:migrate
.
Help is welcome! We are communicating on Discord in the #hwc-development channel
MIT