Run the following instructions in Terminal.
- Get Homebrew
- Install dependencies
brew install postgresql@9.6 mysql rbenv ruby-build nvm openssl yarn
- Checkout repo
git clone git@github.com:AppCamps/www.git
- Change into project directory
cd www
- Install ruby & node
rbenv install && nvm install
- Install bundler & needed gems
gem install bundler && bundle install --path vendor/bundle
- Install node modules
yarn install
- Copy .env.example afterwards and adjust env variables
cp .env.example .env && $EDITOR .env
- Configure config/database.yml
cp config/database.yml.example config/database.yml && $EDITOR config/database.yml
- Setup environment
bin/rails db:environments:set RAILS_ENV=development && bin/rails db:environments:set RAILS_ENV=test
- Setup database & create databases
bundle exec rake db:setup && RAILS_ENV=test bundle exec rake db:setup
- Run tests to see if everything is working
bundle exec rspec && yarn test
- Install invoker (you will be asked for your computer password)
gem install invoker && sudo invoker setup --tld localhost
- Generate localhost certificates and install them
dev/create-certificate
- Add the certificate to you Keychain (Chrome/Safari)
- Start dev server
dev/start
- Open your browser
[https://teach.appcamps.localhost]