This application is my attempt at completing the Adnat (backend) challenge by TandaHQ.
After cloning this repository, please ensure you have the following dependencies to allow you to progress through the build steps:
ruby 2.6.3
rails 6.0.2.1
postgresql 9.5
foreman 0.82.0
gem install foreman -v 0.82.0
If this is your first time installing Ruby or Ruby on Rails then please follow Chris from Gorails' excellent guide.
After cloning, and validating your dependencies please follow these steps:
bundle install
yarn install --check-files
You will need to create a file config/master.key
and paste/save this text 1e051083153e89ff311b1b4d32041107
in that file.
Note: This is a challenge app. If you plan to clone and use this app yourself then you MUST regenerate the credentials and master.key.
Follow the steps below to regenerate a credentials.yml.enc
and master.key
.
Delete the credentials.yml.enc
file.
Regenerate a new credentials.yml.enc
and master.key
by running the command EDITOR=vim rails credentials:edit
.
You should now be ready to create your database, migrate the tables and seed with seed data.
The database.yml
has been setup to use your default postgres
username and password.
rails db:setup
Please validate that the existing application is functioning correctly by running the test suite.
bundle exec rspec spec .
Use foreman to run the Procfile.dex which will start the rails server and webpacker.
foreman start -f Procfile.dev
This application has not been configured for deployment
Once the rails server is running please visit localhost:3000 to interact with Adnat!
If you get an error like rails Webpacker can't find application
then you may need to re-run yarn
.